Class HasEarnedMoneyCondition
java.lang.Object
games.stendhal.server.entity.npc.condition.AbstractChatCondition
games.stendhal.server.entity.npc.condition.HasEarnedMoneyCondition
- All Implemented Interfaces:
ChatCondition,PreTransitionCondition
Condition to check if a player has earned an amount of money by
selling to NPCs.
-
Constructor Summary
ConstructorsConstructorDescriptionHasEarnedMoneyCondition(int amount) Creates a condition that checks if player has earned an amount of money from any NPC.HasEarnedMoneyCondition(int amount, String... npcs) Creates a condition that checks if player has earned an amount of money from each NPC.HasEarnedMoneyCondition(int amount, List<String> npcs) Creates a condition that checks if player has earned an amount of money from each NPC.HasEarnedMoneyCondition(Map<String, Integer> amounts) Creates a condition that checks if player has earned an amount of money from each NPC. -
Method Summary
Methods inherited from class games.stendhal.server.entity.npc.condition.AbstractChatCondition
getNextUniqueHashModifier
-
Constructor Details
-
HasEarnedMoneyCondition
public HasEarnedMoneyCondition(int amount) Creates a condition that checks if player has earned an amount of money from any NPC.- Parameters:
amount- The minimum amount required.
-
HasEarnedMoneyCondition
Creates a condition that checks if player has earned an amount of money from each NPC.- Parameters:
amount- The minimum amount required.npcs- NPC buyer names.
-
HasEarnedMoneyCondition
Creates a condition that checks if player has earned an amount of money from each NPC.- Parameters:
amount- The minimum amount required.npcs- NPC buyer names.
-
HasEarnedMoneyCondition
Creates a condition that checks if player has earned an amount of money from each NPC.- Parameters:
amounts- NPC buyer names & amount required for each.
-
-
Method Details
-
fire
Description copied from interface:PreTransitionConditioncan the transition be done?- Parameters:
player- player who caused the transitionsentence- text he/she saidentity- the NPC doing the transition- Returns:
- true, if the transition is possible, false otherwise
-
toString
-
hashCode
public int hashCode() -
equals
-