Class MerchantsRegister
java.lang.Object
games.stendhal.server.entity.npc.behaviour.journal.MerchantsRegister
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add(SpeakerNPC npc, MerchantBehaviour behaviour)
Adds an NPC to the NPCList.static MerchantsRegister
get()
Singleton access method.Retrieves list of NPC names registered as buyers.Retrieves list of NPC names registered as sellers.
-
Constructor Details
-
MerchantsRegister
protected MerchantsRegister()
-
-
Method Details
-
get
Singleton access method.- Returns:
- The static instance.
-
add
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 addedbehaviour
- The MerchantBehaviour of that NPC
-
getBuyers
-
getSellers
-
getBuyersNames
Retrieves list of NPC names registered as buyers.- Returns:
- Buyers names.
-
getSellersNames
Retrieves list of NPC names registered as sellers.- Returns:
- Sellers names.
-