Class WeddingRing

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

public class WeddingRing extends Item
A special ring that allows the owner to teleport to his or her spouse. The spouse's name is engraved into the ring. Technically, the name is stored in the item's infostring. Wedding rings should always be bound to the owner.
Author:
daniel
  • Constructor Details

    • WeddingRing

      public WeddingRing(String name, String clazz, String subclass, Map<String,​String> attributes)
      Creates a new wedding ring.
      Parameters:
      name -
      clazz -
      subclass -
      attributes -
    • WeddingRing

      public WeddingRing(WeddingRing item)
      Copy constructor.
      Parameters:
      item - item to copy
  • Method Details

    • onUsed

      public boolean onUsed(RPEntity user)
      Description copied from interface: UseListener
      Invoked when the object is used.
      Specified by:
      onUsed in interface UseListener
      Overrides:
      onUsed in class Item
      Parameters:
      user - the RPEntity who uses the object
      Returns:
      true if successful
    • describe

      public String describe()
      Description copied from class: Entity
      Describes the entity (if a players looks at it).
      Overrides:
      describe in class Item
      Returns:
      description from the players point of view
    • setContainer

      public void setContainer(SlotOwner container, RPSlot slot)
      Description copied from class: RPObject
      This make this object to be contained in the slot of container.
      Overrides:
      setContainer in class RPObject
      Parameters:
      container - the object that is going to contain this object.
      slot - the slot of the object that contains this object.