All Implemented Interfaces:
EquipListener, TurnListener, UseListener, Stackable<StackableItem>, Killer, Cloneable, Iterable<String>, Serializable
Direct Known Subclasses:
BlankPetScroll, EmptyScroll, SummonPetScroll, SummonScroll, TeleportScroll

public class Scroll extends StackableItem
Represents a scroll.
  • Constructor Details

    • Scroll

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

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

    • onUsed

      public final 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
    • useScroll

      protected boolean useScroll(Player player)
      Use a scroll.
      Parameters:
      player - The player using scroll.
      Returns:
      true if successful, false otherwise.