Class EquipRandomAmountOfItemAction
java.lang.Object
games.stendhal.server.entity.npc.action.EquipRandomAmountOfItemAction
- All Implemented Interfaces:
ChatAction
,PostTransitionAction
@Dev(category=ITEMS_OWNED,
label="Item+")
public class EquipRandomAmountOfItemAction
extends Object
implements ChatAction
Chooses and equips the specified item from a list
-
Constructor Summary
ConstructorDescriptionEquipRandomAmountOfItemAction(String item, int min, int max)
Creates a new EquipRandomAmountOfItemAction.
Since stackable, min and max must be > 0.
If min > max, min is treated like max and vice versaEquipRandomAmountOfItemAction(String item, int min, int max, int multiplayer)
Creates a new EquipRandomItemAction.
Since stackable, min and max must be > 0.
If min > max, min is treated like max and vice versa -
Method Summary
-
Constructor Details
-
EquipRandomAmountOfItemAction
Creates a new EquipRandomAmountOfItemAction.
Since stackable, min and max must be > 0.
If min > max, min is treated like max and vice versa- Parameters:
item
- stackable itemmin
- minimum quantitymax
- maximum quantity
-
EquipRandomAmountOfItemAction
@Dev public EquipRandomAmountOfItemAction(String item, int min, int max, @Dev(defaultValue="1") int multiplayer)Creates a new EquipRandomItemAction.
Since stackable, min and max must be > 0.
If min > max, min is treated like max and vice versa- Parameters:
item
- stackable itemmin
- lower boundmax
- upper boundmultiplayer
- ie, only return numbers multiples of X
-
-
Method Details
-
fire
Description copied from interface:PostTransitionAction
does some action after a transition.- Specified by:
fire
in interfaceChatAction
- Specified by:
fire
in interfacePostTransitionAction
- Parameters:
player
- player who caused the transitionsentence
- text he/she saidnpc
- the NPC doing the transition
-
toString
-
hashCode
public int hashCode() -
equals
-