Class ScriptingSandbox
java.lang.Object
games.stendhal.server.core.scripting.ScriptingSandbox
- Direct Known Subclasses:
ScriptInGroovy
,ScriptInJava
,ScriptInLua
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
addGameEvent(String source, String event, List<String> params)
boolean
Executes this script.getCreature(String clazz)
Creature[]
Item[]
getItems()
Retrieves a zone by string ID.abstract boolean
void
boolean
playerIsInZone(Player player, String zoneName)
protected void
postExecute(Player player, List<String> args, boolean result)
Cleans up execution of the script.protected void
preExecute(Player player, List<String> args)
Prepares execution of the script.void
privateText(Player player, String text)
void
void
protected void
setMessage(String message)
boolean
setZone(StendhalRPZone zone)
boolean
void
Unloads this script.
-
Constructor Details
-
ScriptingSandbox
-
-
Method Details
-
getZone
-
getZone
Retrieves a zone by string ID.- Parameters:
zoneName
- Name of zone to retrieve.- Returns:
- StendhalRPZone, if exists,
null
otherwise.
-
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 ornull
on server start.args
- the arguments the admin specified ornull
on server start.
-
preExecute
Prepares execution of the script.- Parameters:
player
- the admin who load it ornull
on server start.args
- the arguments the admin specified ornull
on server start.
-
postExecute
Cleans up execution of the script.- Parameters:
player
- the admin who load it ornull
on server start.args
- the arguments the admin specified ornull
on server start.result
- true, if the execution was successful; false otherwise
-
execute
Executes this script.- Parameters:
player
- the admin who load it ornull
on server start.args
- the arguments the admin specified ornull
on server start.- Returns:
true
at successful execution, otherwisefalse
-