Class StoredChest

All Implemented Interfaces:
UseListener, Killer, Cloneable, Iterable<String>, Serializable

public class StoredChest extends Chest
A Chest whose contents are stored by the zone.
Author:
kymara
  • Constructor Details

    • StoredChest

      public StoredChest()
      Creates a new StoredChest.
    • StoredChest

      public StoredChest(RPObject rpobject)
      Creates a StoredChest based on an existing RPObject. This is just for loading a chest from the database, use the other constructors.
      Parameters:
      rpobject -
  • Method Details

    • open

      public void open()
      Description copied from class: Chest
      Open the chest.
      Overrides:
      open in class Chest
    • close

      public void close()
      Description copied from class: Chest
      Close the chest.
      Overrides:
      close in class Chest
    • getDescriptionName

      public String getDescriptionName(boolean definite)
      Description copied from class: Entity
      Returns the name or something that can be used to identify the entity for the player.
      Overrides:
      getDescriptionName in class Chest
      Parameters:
      definite - true for "the" and false for "a/an" in case the entity has no name
      Returns:
      name
    • chestCloser

      protected boolean chestCloser()
      Checks if it should close the chest
      Returns:
      true if it should be called again.
    • onRemoved

      public void onRemoved(StendhalRPZone zone)
      Description copied from class: Entity
      Called when this object is being removed from a zone.
      Overrides:
      onRemoved in class Entity
      Parameters:
      zone - The zone this will be removed from.