Class PlayerLootedItemsHandler
java.lang.Object
games.stendhal.server.entity.player.PlayerLootedItemsHandler
Handling for counting looted items of a player
- Author:
- madmetzger
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
name of the map where the items and the corresponding numbers are stored -
Constructor Summary
ConstructorDescriptionPlayerLootedItemsHandler(Player player)
Create a new PlayerLootedItemsHandler for a player -
Method Summary
Modifier and TypeMethodDescriptionint
getNumberOfLootsForItem(String item)
Gets the how often this PlayerLootedItemsHandler's player has looted the given itemint
getQuantityOfBoughtItems(String item)
Retrieve the amount of much an item was bought by a playerint
Retrieve the amount of much an item was harvested by a playerint
getQuantityOfMinedItems(String item)
Retrieve the amount of much an item was mined by a playerint
int
getQuantityOfProducedItems(String item)
Retrieve the amount of much an item was produced by a playerint
getQuantityOfSoldItems(String item)
void
incBoughtForItem(String item, int count)
Increases the quantity an item was boughtvoid
incHarvestedForItem(String item, int count)
Increases the quantity an item was harvestedvoid
incLootForItem(String item, int count)
Increases the count of loots for the given item for this PlayerLootedItemsHandler's playervoid
incMinedForItem(String item, int count)
Increases the quantity an item was mined from a source like gold, coalvoid
incObtainedForItem(String item, int count)
Increases the count of obtains for the given item for this PlayerLootedItemsHandler's playervoid
incProducedForItem(String item, int count)
Increases the count of producing for the given item for this PlayerLootedItemsHandler's playervoid
incSoldForItem(String item, int count)
Increases the quantity an item was sold
-
Field Details
-
LOOTED_ITEMS
name of the map where the items and the corresponding numbers are stored- See Also:
- Constant Field Values
-
-
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
-
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
-
-
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
-