Class EntitySlot

java.lang.Object
marauroa.common.game.RPSlot
games.stendhal.server.entity.slot.EntitySlot
All Implemented Interfaces:
Slot, Cloneable, Iterable<RPObject>, Serializable
Direct Known Subclasses:
ContainerItemSlot, GroundSlot, KeyedSlot, LootableSlot, PlayerSlot, TradeCenterMarketSlot

public class EntitySlot extends RPSlot implements Slot
Stendhal specific information about this slot.
Author:
hendrik
  • Constructor Details

    • EntitySlot

      public EntitySlot()
      Creates an uninitialized EntitySlot.
    • EntitySlot

      public EntitySlot(String name, String contentSlotName)
      Creates a new EntitySlot.
      Parameters:
      name - name of slot
      contentSlotName - name of slot used by the "item may be put in" check
  • Method Details

    • isReachableForTakingThingsOutOfBy

      public boolean isReachableForTakingThingsOutOfBy(Entity entity)
      Description copied from interface: Slot
      Is this slot reachable to take things out of?
      Specified by:
      isReachableForTakingThingsOutOfBy in interface Slot
      Parameters:
      entity - Entity which may be able to reach this slot
      Returns:
      true, if it is reachable, false otherwise
    • isReachableForThrowingThingsIntoBy

      public boolean isReachableForThrowingThingsIntoBy(Entity entity)
      Description copied from interface: Slot
      Is this slot reachable to put things into?
      Specified by:
      isReachableForThrowingThingsIntoBy in interface Slot
      Parameters:
      entity - Entity which may be able to reach this slot
      Returns:
      true, if it is reachable, false otherwise
    • isItemSlot

      public boolean isItemSlot()
      Description copied from interface: Slot
      Can this slot contain items?
      Specified by:
      isItemSlot in interface Slot
      Returns:
      true, if it can contains items, false otherwise
    • isTargetBoundCheckRequired

      public boolean isTargetBoundCheckRequired()
      Description copied from interface: Slot
      does this slot require that the bounding of items is check on adding items
      Specified by:
      isTargetBoundCheckRequired in interface Slot
      Returns:
      true, if bound items have to be checked, false otherwise
    • setErrorMessage

      protected void setErrorMessage(String errorMessage)
      sets the error message
      Parameters:
      errorMessage - error message to set
    • getErrorMessage

      public String getErrorMessage()
      gets the last error message
      Returns:
      error message or null
    • clearErrorMessage

      public void clearErrorMessage()
      clears the last error message
    • getContentSlotName

      public String getContentSlotName()
      gets the slot name for the item check
      Returns:
      slot name
    • getSlotType

      public String getSlotType()
      gets the type of the slot ("slot", "ground", "market")
      Returns:
      slot type