Class LuaScript

java.lang.Object
games.stendhal.server.core.scripting.ScriptingSandbox
games.stendhal.server.core.scripting.lua.LuaScript

public class LuaScript extends ScriptingSandbox
Lua script representation.
  • Method Details

    • isResource

      public boolean isResource()
      Checks if the script is loaded as a resource.
    • hasParent

      public boolean hasParent()
      Checks if this script was called by another script instance.
    • getParent

      public LuaScript getParent()
      Retrieves the parent caller script.
    • getCaller

      public Player getCaller()
      Retrieves player that called script.
    • getArgs

      public List<String> getArgs()
      Retrieves list of parameters passed to script.
    • getChunkName

      public String getChunkName()
      Retrieves the chunk identifier or filename.
    • getDirName

      public Path getDirName()
      Retrieves directory path of script or `null` if script is a resource.
    • load

      public boolean load(Player caller, List<String> args)
      Specified by:
      load in class ScriptingSandbox
    • load

      public boolean load()
      Loads & executes the script.