Package games.stendhal.server.script
Class Herald
java.lang.Object
games.stendhal.server.core.scripting.ScriptImpl
games.stendhal.server.script.Herald
- All Implemented Interfaces:
Script
A herald which will tell news to citizens.
- Author:
- yoriy
-
Field Summary
FieldsFields inherited from class games.stendhal.server.core.scripting.ScriptImpl
sandbox -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidload(Player admin, List<String> args, ScriptingSandbox sandbox) invokes by /script -load Herald.class, placing herald near calling admin.voidUnloads this script.voidworkWithCounters(int id) function invokes by HeraldListener.onTurnReached each time when herald have to speech.Methods inherited from class games.stendhal.server.core.scripting.ScriptImpl
execute
-
Field Details
-
HeraldName
- See Also:
-
-
Constructor Details
-
Herald
public Herald()
-
-
Method Details
-
load
invokes by /script -load Herald.class, placing herald near calling admin.- Specified by:
loadin interfaceScript- Overrides:
loadin classScriptImpl- Parameters:
admin- the admin who load it ornullon server start.args- the arguments the admin specified ornullon server start.sandbox- all modifications to the game must be done using this object in order for the script to be unloadable
-
unload
Description copied from interface:ScriptUnloads this script.- Specified by:
unloadin interfaceScript- Overrides:
unloadin classScriptImpl- Parameters:
admin- the admin who load it ornullon server start.args- the arguments the admin specified ornullon server start.
-
workWithCounters
public void workWithCounters(int id) function invokes by HeraldListener.onTurnReached each time when herald have to speech.- Parameters:
id- - ID for news in news list
-