Class MerchantsRegister

java.lang.Object
games.stendhal.server.entity.npc.behaviour.journal.MerchantsRegister

public class MerchantsRegister extends Object
  • Constructor Details

    • MerchantsRegister

      protected MerchantsRegister()
  • Method Details

    • get

      public static MerchantsRegister get()
      Singleton access method.
      Returns:
      The static instance.
    • add

      public void add(SpeakerNPC npc, MerchantBehaviour behaviour)
      Adds an NPC to the NPCList. Does nothing if an NPC with the same name already exists. This makes sure that each NPC can be uniquely identified by his/her name.
      Parameters:
      npc - The NPC that should be added
      behaviour - The MerchantBehaviour of that NPC
    • getBuyers

      public List<Pair<String,​BuyerBehaviour>> getBuyers()
    • getSellers

      public List<Pair<String,​SellerBehaviour>> getSellers()
    • getBuyersNames

      public List<String> getBuyersNames()
      Retrieves list of NPC names registered as buyers.
      Returns:
      Buyers names.
    • getSellersNames

      public List<String> getSellersNames()
      Retrieves list of NPC names registered as sellers.
      Returns:
      Sellers names.