Class RandomAction

java.lang.Object
games.stendhal.server.entity.npc.action.RandomAction
All Implemented Interfaces:
ChatAction, PostTransitionAction

@Dev(category=IGNORE) public class RandomAction extends Object implements ChatAction
executes a random action from a list of actions. It calls fire() on one of the actions, when its own fire() is called.
  • Constructor Details

    • RandomAction

      public RandomAction(ChatAction... action)
      Creates a new RandomAction.
      Parameters:
      action - action to execute
    • RandomAction

      public RandomAction(List<ChatAction> actions)
      Creates a new RandomAction.
      Parameters:
      actions - list of actions to execute
  • Method Details