Class EquipmentAction

java.lang.Object
games.stendhal.server.actions.equip.EquipmentAction
All Implemented Interfaces:
ActionListener
Direct Known Subclasses:
DropAction, EquipAction

public abstract class EquipmentAction extends Object implements ActionListener
This listener handles all entity movements from a slot to either another slot or the ground. The source can be: baseitem - object id of the item which should be moved (optional, only when the source is inside a slot) baseobject - (only when the item is in a slot) object id of the object containing the slot where the item is in baseslot - (only when the item is in a slot) slot name where the item is in (/optional) The target can be either an 'equip': type - "equip" targetobject - object id of the container object targetslot - slot name where the item should be moved to or a 'drop': type - "drop" x - the x-coordinate on the ground y - the y-coordinate on the ground
  • Field Details

    • logger

      protected static final org.apache.log4j.Logger logger
    • validContainerClassesList

      protected final List<Class<?>> validContainerClassesList
      List of the valid container classes for easy access.
  • Constructor Details

    • EquipmentAction

      public EquipmentAction()
  • Method Details

    • onAction

      public void onAction(Player player, RPAction action)
      Description copied from interface: ActionListener
      processes the requested action.
      Specified by:
      onAction in interface ActionListener
      Parameters:
      player - the caller of the action
      action - the action to be performed
    • execute

      protected abstract void execute(Player player, RPAction action, games.stendhal.server.actions.equip.SourceObject source)