Class LuaScript
java.lang.Object
games.stendhal.server.core.scripting.ScriptingSandbox
games.stendhal.server.core.scripting.lua.LuaScript
Lua script representation.
-
Field Summary
Fields inherited from class games.stendhal.server.core.scripting.ScriptingSandbox
filename -
Method Summary
Modifier and TypeMethodDescriptiongetArgs()Retrieves list of parameters passed to script.Retrieves player that called script.Retrieves the chunk identifier or filename.Retrieves directory path of script or `null` if script is a resource.Retrieves the parent caller script.booleanChecks if this script was called by another script instance.booleanChecks if the script is loaded as a resource.booleanload()Loads & executes the script.booleanMethods inherited from class games.stendhal.server.core.scripting.ScriptingSandbox
add, add, add, add, addGameEvent, execute, getCreature, getCreatures, getItem, getItems, getMessage, getZone, getZone, modify, playerIsInZone, postExecute, preExecute, privateText, remove, remove, setMessage, setZone, setZone, unload
-
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
Retrieves the parent caller script. -
getCaller
Retrieves player that called script. -
getArgs
Retrieves list of parameters passed to script. -
getChunkName
Retrieves the chunk identifier or filename. -
getDirName
Retrieves directory path of script or `null` if script is a resource. -
load
- Specified by:
loadin classScriptingSandbox
-
load
public boolean load()Loads & executes the script.
-