Class ProducerRegister
java.lang.Object
games.stendhal.server.entity.npc.behaviour.journal.ProducerRegister
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add(String npcName, MultiProducerBehaviour behaviour)
void
add(String npcName, ProducerBehaviour behaviour)
Adds an NPC to the NPCList.static ProducerRegister
get()
Singleton access method.getProducedItemDetails(String itemName)
gets description of the produced item Note: if more than one NPC makes the item, just the details of the first NPC in the list who makes it are returnedgetProducedItemNames(String clazz)
gets names of all items produced, which are of the given item class (i.e.getProductionDescription(Player player, String npcName)
gets description of the productiongetProductionDetails(Player player, String npcName)
gets details on the progress of the productiongetWorkingProducerNames(Player player)
gets the names of all the NPCs to whom the player has asked to produce somethinglistWorkingProducers(Player player)
-
Constructor Details
-
ProducerRegister
protected ProducerRegister()
-
-
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:
npcName
- The NPC that should be addedbehaviour
- The ProducerBehaviour of that NPC
-
add
-
getProducers
-
getMultiProducers
-
listWorkingProducers
-
getProductionDescription
gets description of the production- Parameters:
player
- player to get the description fornpcName
- name of quest- Returns:
- details
-
getProducedItemDetails
gets description of the produced item Note: if more than one NPC makes the item, just the details of the first NPC in the list who makes it are returned- Parameters:
itemName
- produced item- Returns:
- details about the produced item
-
getProducedItemNames
gets names of all items produced, which are of the given item class (i.e. food, drink)- Parameters:
clazz
- Item class to check- Returns:
- list of item names
-
getWorkingProducerNames
gets the names of all the NPCs to whom the player has asked to produce something- Parameters:
player
- player to get the details for- Returns:
- NPC names
-
getProductionDetails
gets details on the progress of the production- Parameters:
player
- player to get the details fornpcName
- name of quest- Returns:
- details
-