Class RandomAction
java.lang.Object
games.stendhal.server.entity.npc.action.RandomAction
- All Implemented Interfaces:
ChatAction,PostTransitionAction
executes a random action from a list of actions.
It calls fire() on one of the actions, when its own
fire() is called.
-
Constructor Summary
ConstructorsConstructorDescriptionRandomAction(ChatAction... action) Creates a new RandomAction.RandomAction(List<ChatAction> actions) Creates a new RandomAction. -
Method Summary
-
Constructor Details
-
RandomAction
Creates a new RandomAction.- Parameters:
action- action to execute
-
RandomAction
Creates a new RandomAction.- Parameters:
actions- list of actions to execute
-
-
Method Details
-
fire
Description copied from interface:PostTransitionActiondoes some action after a transition.- Specified by:
firein interfaceChatAction- Specified by:
firein interfacePostTransitionAction- Parameters:
player- player who caused the transitionsentence- text he/she saidnpc- the NPC doing the transition
-
toString
-
hashCode
public int hashCode() -
equals
-