Class AbstractAdminScript
java.lang.Object
games.stendhal.server.core.scripting.ScriptImpl
games.stendhal.server.core.scripting.AbstractAdminScript
- All Implemented Interfaces:
Script
- Direct Known Subclasses:
DebugWeather,FreezeHell,ListSpawnPoints,SpawnCreature
-
Field Summary
FieldsFields inherited from class games.stendhal.server.core.scripting.ScriptImpl
sandbox -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes this script.protected intRetrieves maximum number of parameters required to run script.protected intRetrieves minumum number of parameters required to run script.Retrieves extended instructions on parameter usage.Retrieves a list of parameter strings that this script accepts.getUsage()Retrieves a string representation of usage information.protected abstract voidInstructions to execute after parameter count sanity is checked.protected voidWrapper for sending error text to admin.protected voidWrapper for sending information text to admin.protected voidWrapper for sending standard text to admin.protected voidsendWarning(String msg) Wrapper for sending warning text to admin.voidDisplays usage information to admin.Methods inherited from class games.stendhal.server.core.scripting.ScriptImpl
load, unload
-
Field Details
-
admin
Admin player executing script.
-
-
Constructor Details
-
AbstractAdminScript
public AbstractAdminScript()
-
-
Method Details
-
run
Instructions to execute after parameter count sanity is checked.- Parameters:
args- Parameters passed to the script.
-
execute
Description copied from interface:ScriptExecutes this script.- Specified by:
executein interfaceScript- Overrides:
executein classScriptImpl- Parameters:
admin- the admin who load it ornullon server start.args- the arguments the admin specified ornullon server start.
-
sendText
Wrapper for sending standard text to admin.- Parameters:
msg- Message contents.
-
sendInfo
Wrapper for sending information text to admin.- Parameters:
msg- Messag contents.
-
sendWarning
Wrapper for sending warning text to admin.- Parameters:
msg- Message contents.
-
sendError
Wrapper for sending error text to admin.- Parameters:
msg- Message contents.
-
getMinParams
protected int getMinParams()Retrieves minumum number of parameters required to run script. -
getMaxParams
protected int getMaxParams()Retrieves maximum number of parameters required to run script. An indefinite amount can be specified with-1. -
showUsage
public void showUsage()Displays usage information to admin. -
getUsage
Retrieves a string representation of usage information. -
getParamStrings
Retrieves a list of parameter strings that this script accepts. An empty string can be included to show execution without parameters. -
getParamDetails
Retrieves extended instructions on parameter usage.
-