Class ScriptingSandbox
java.lang.Object
games.stendhal.server.core.scripting.ScriptingSandbox
- Direct Known Subclasses:
LuaScript,LuaWorldHelper,ScriptInGroovy,ScriptInJava
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidaddGameEvent(String source, String event, List<String> params) booleanExecutes this script.getCreature(String clazz) Creature[]Item[]getItems()Retrieves a zone by string ID.abstract booleanvoidbooleanplayerIsInZone(Player player, String zoneName) protected voidpostExecute(Player player, List<String> args, boolean result) Cleans up execution of the script.protected voidpreExecute(Player player, List<String> args) Prepares execution of the script.voidprivateText(Player player, String text) voidvoidprotected voidsetMessage(String message) booleansetZone(StendhalRPZone zone) booleanvoidUnloads this script.
-
Field Details
-
filename
-
-
Constructor Details
-
ScriptingSandbox
-
-
Method Details
-
getZone
-
getZone
Retrieves a zone by string ID.- Parameters:
zoneName- Name of zone to retrieve.- Returns:
- StendhalRPZone, if exists,
nullotherwise.
-
setZone
-
setZone
-
playerIsInZone
-
add
-
add
-
add
-
getCreatures
-
getCreature
-
getItems
-
getItem
-
add
-
addGameEvent
-
modify
-
privateText
-
load
-
getMessage
-
setMessage
-
remove
-
remove
-
unload
Unloads this script.- Parameters:
player- the admin who load it ornullon server start.args- the arguments the admin specified ornullon server start.
-
preExecute
Prepares execution of the script.- Parameters:
player- the admin who load it ornullon server start.args- the arguments the admin specified ornullon server start.
-
postExecute
Cleans up execution of the script.- Parameters:
player- the admin who load it ornullon server start.args- the arguments the admin specified ornullon server start.result- true, if the execution was successful; false otherwise
-
execute
Executes this script.- Parameters:
player- the admin who load it ornullon server start.args- the arguments the admin specified ornullon server start.- Returns:
trueat successful execution, otherwisefalse
-