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
Fields inherited from class games.stendhal.server.core.scripting.ScriptImpl
sandbox
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
load(Player admin, List<String> args, ScriptingSandbox sandbox)
invokes by /script -load Herald.class, placing herald near calling admin.void
workWithCounters(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, unload
-
Field Details
-
HeraldName
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Herald
public Herald()
-
-
Method Details
-
load
invokes by /script -load Herald.class, placing herald near calling admin.- Specified by:
load
in interfaceScript
- Overrides:
load
in classScriptImpl
- Parameters:
admin
- the admin who load it ornull
on server start.args
- the arguments the admin specified ornull
on server start.sandbox
- all modifications to the game must be done using this object in order for the script to be unloadable
-
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
-