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

public class ShopSign extends Sign implements UseListener
A sign for a ShopList.
  • Field Details

    • shops

      protected ShopList shops
      The shop list.
    • shopName

      protected String shopName
      Name of shop
    • title

      protected String title
      Caption of sign
    • caption

      protected String caption
      Caption to display above the table
  • Constructor Details

    • ShopSign

      public ShopSign(String name, String title, String caption, boolean seller)
      Create a shop list sign.
      Parameters:
      name - the shop name.
      title - the sign title.
      caption - the caption above the table
      seller - true, if this sign is for items sold by an NPC
  • Method Details

    • onUsed

      public boolean onUsed(RPEntity user)
      Handles use-actions.
      Specified by:
      onUsed in interface UseListener
      Parameters:
      user - the RPEntity who uses the object
      Returns:
      true if successful
    • generateItemList

      protected List<Item> generateItemList()
      Generates the item list for this shop.
      Returns:
      ItemList
    • generateItemList

      protected List<Item> generateItemList(Map<String,​Integer> items)
      Generates the item list for this shop.
      Parameters:
      items - Items and prices to be added to sign.
      Returns:
      ItemList