Class SoldNumberOfCondition
java.lang.Object
games.stendhal.server.core.rp.achievement.condition.SoldNumberOfCondition
- All Implemented Interfaces:
ChatCondition
,PreTransitionCondition
Checks if a player has sold a number of items.
-
Constructor Summary
ConstructorDescriptionSoldNumberOfCondition(int count, String... itemName)
Constructor to check multiple items.SoldNumberOfCondition(int count, List<String> items)
Constructor to check multiple items.SoldNumberOfCondition(String itemName, int count)
Constructor to check a single item.SoldNumberOfCondition(Map<String,Integer> items)
Constructor to check multiple items of different amounts. -
Method Summary
-
Constructor Details
-
SoldNumberOfCondition
Constructor to check a single item.- Parameters:
itemName
- Name of the item.count
- Minimum required amount.
-
SoldNumberOfCondition
Constructor to check multiple items.- Parameters:
count
- Minimum required amount.itemName
- Names of the items.
-
SoldNumberOfCondition
Constructor to check multiple items.- Parameters:
count
- Minimum required amount.items
- List of item names.
-
SoldNumberOfCondition
Constructor to check multiple items of different amounts.- Parameters:
items
- List of item & the minimum required amount for each.
-
-
Method Details
-
fire
Description copied from interface:PreTransitionCondition
can the transition be done?- Specified by:
fire
in interfaceChatCondition
- Specified by:
fire
in interfacePreTransitionCondition
- Parameters:
player
- player who caused the transitionsentence
- text he/she saidnpc
- the NPC doing the transition- Returns:
- true, if the transition is possible, false otherwise
-
toString
-
hashCode
public int hashCode() -
equals
-