Package games.stendhal.server.script
Class SokobanReload
java.lang.Object
games.stendhal.server.core.scripting.ScriptImpl
games.stendhal.server.script.SokobanReload
- All Implemented Interfaces:
FilterCriteria<Entity>,Script
reloads the sokoban data file
- Author:
- hendrik
-
Field Summary
Fields inherited from class games.stendhal.server.core.scripting.ScriptImpl
sandbox -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class games.stendhal.server.core.scripting.ScriptImpl
load, unload
-
Constructor Details
-
SokobanReload
public SokobanReload()
-
-
Method Details
-
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.
-
passes
Description copied from interface:FilterCriteriaImplement this method to return true, if a given object in the collection should pass this filter. Example: Class Car has an attribute color (String). You only want Cars whose color equals "red". 1) Write the FilterCriteria implementation: class RedColorFilterCriteria implements FilterCriteria{ public boolean passes(Object o){ return ((Car)o).getColor().equals("red"); } } 2) Then add this FilterCriteria to a CollectionFilter: CollectionFilter filter = new CollectionFilter(); filter.addFilterCriteria(new ColorFilterCriteria()); 3) Now filter: filter.filter(carCollection);- Specified by:
passesin interfaceFilterCriteria<Entity>- Parameters:
o- object- Returns:
- true, if a given object in the collection passes this filter.
-