Class SokobanReload

java.lang.Object
games.stendhal.server.core.scripting.ScriptImpl
games.stendhal.server.script.SokobanReload
All Implemented Interfaces:
FilterCriteria<Entity>, Script

public class SokobanReload extends ScriptImpl implements FilterCriteria<Entity>
reloads the sokoban data file
Author:
hendrik
  • Constructor Details

    • SokobanReload

      public SokobanReload()
  • Method Details

    • execute

      public void execute(Player admin, List<String> args)
      Description copied from interface: Script
      Executes this script.
      Specified by:
      execute in interface Script
      Overrides:
      execute in class ScriptImpl
      Parameters:
      admin - the admin who load it or null on server start.
      args - the arguments the admin specified or null on server start.
    • passes

      public boolean passes(Entity o)
      Description copied from interface: FilterCriteria
      Implement 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:
      passes in interface FilterCriteria<Entity>
      Parameters:
      o - object
      Returns:
      true, if a given object in the collection passes this filter.