Class MoveableObject

java.lang.Object
games.stendhal.server.actions.equip.MoveableObject

public abstract class MoveableObject extends Object
source or destination object.
Author:
hendrik
  • Field Details

    • parent

      protected Entity parent
      optional, parent item .
    • slot

      protected String slot
      the slot this item is in or should be placed into.
    • player

      protected final Player player
      Player to notify about problems.
  • Constructor Details

    • MoveableObject

      public MoveableObject(Player player)
      Creates a new MoveableObject.
      Parameters:
      player - Player to notify about problems
  • Method Details

    • isValid

      public abstract boolean isValid()
      is this object valid?
      Returns:
      true, if the action may be performed, false otherwise
    • checkDistance

      public abstract boolean checkDistance(Entity entity, double distance)
      is the owner of the slot in reach?
      Parameters:
      entity - entity to compare to
      distance - max distance
      Returns:
      true, if it is reachable, false otherwise
    • getLogInfo

      public abstract String[] getLogInfo()
      returns log information.
      Returns:
      String[2]
    • checkClass

      public boolean checkClass(List<Class<?>> validClasses)
      Checks if RPobject is one the valid classes.
      Parameters:
      validClasses -
      Returns:
      true if the rpobject is one of the classes in validClasses.
    • isContainerCorpse

      public boolean isContainerCorpse()
      Checks if container is a corpse.
      Returns:
      true if container is a corpse.