Class PlayerLootedItemsHandler
java.lang.Object
games.stendhal.server.entity.player.PlayerLootedItemsHandler
Handling for counting looted items of a player
- Author:
- madmetzger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringname of the map where the items and the corresponding numbers are stored -
Constructor Summary
ConstructorsConstructorDescriptionPlayerLootedItemsHandler(Player player) Create a new PlayerLootedItemsHandler for a player -
Method Summary
Modifier and TypeMethodDescriptionintGets the how often this PlayerLootedItemsHandler's player has looted the given itemintRetrieve the amount of much an item was bought by a playerintRetrieve the amount of much an item was harvested by a playerintRetrieve the amount of much an item was mined by a playerintintRetrieve the amount of much an item was produced by a playerintgetQuantityOfSoldItems(String item) intgetQuantityOfSownItems(String item) Retrieve the amount of items sown by player.voidincBoughtForItem(String item, int count) Increases the quantity an item was boughtvoidincHarvestedForItem(String item, int count) Increases the quantity an item was harvestedvoidincLootForItem(String item, int count) Increases the count of loots for the given item for this PlayerLootedItemsHandler's playervoidincMinedForItem(String item, int count) Increases the quantity an item was mined from a source like gold, coalvoidincObtainedForItem(String item, int count) Increases the count of obtains for the given item for this PlayerLootedItemsHandler's playervoidincProducedForItem(String item, int count) Increases the count of producing for the given item for this PlayerLootedItemsHandler's playervoidincSoldForItem(String item, int count) Increases the quantity an item was soldvoidincSownForItem(String item, int count) Increses the quanity an item was sown.
-
Field Details
-
LOOTED_ITEMS
name of the map where the items and the corresponding numbers are stored- See Also:
-
-
Constructor Details
-
PlayerLootedItemsHandler
Create a new PlayerLootedItemsHandler for a player- Parameters:
player-
-
-
Method Details
-
getNumberOfLootsForItem
Gets the how often this PlayerLootedItemsHandler's player has looted the given item- Parameters:
item- the item name- Returns:
- the number of loots from corpses
-
getQuantityOfProducedItems
Retrieve the amount of much an item was produced by a player- Parameters:
item-- Returns:
- the produced quantity
-
getQuantityOfSownItems
Retrieve the amount of items sown by player.- Parameters:
item- Item Name.- Returns:
- Integer sown quanity.
-
getQuantityOfHarvestedItems
Retrieve the amount of much an item was harvested by a player- Parameters:
item-- Returns:
- the harvested quantity
-
getQuantityOfBoughtItems
Retrieve the amount of much an item was bought by a player- Parameters:
item-- Returns:
- the harvested quantity
-
getQuantityOfSoldItems
- Parameters:
item-- Returns:
-
getQuantityOfMinedItems
Retrieve the amount of much an item was mined by a player- Parameters:
item-- Returns:
- the mined quantity
-
incLootForItem
Increases the count of loots for the given item for this PlayerLootedItemsHandler's player- Parameters:
item- the item namecount- the amount to increase
-
incProducedForItem
Increases the count of producing for the given item for this PlayerLootedItemsHandler's player- Parameters:
item- the item namecount- the amount to increase
-
incObtainedForItem
Increases the count of obtains for the given item for this PlayerLootedItemsHandler's player- Parameters:
item- the item namecount- the amount to increase
-
incMinedForItem
Increases the quantity an item was mined from a source like gold, coal- Parameters:
item-count-
-
incSownForItem
Increses the quanity an item was sown.- Parameters:
item- Item name.count- Increment amount.
-
incHarvestedForItem
Increases the quantity an item was harvested- Parameters:
item-count-
-
incBoughtForItem
Increases the quantity an item was bought- Parameters:
item-count-
-
incSoldForItem
Increases the quantity an item was sold- Parameters:
item-count-
-
getQuantityOfObtainedItems
public int getQuantityOfObtainedItems()- Returns:
- the whole number of items a player has obtained from the well
-