Class AdministrationAction

java.lang.Object
games.stendhal.server.actions.admin.AdministrationAction
All Implemented Interfaces:
ActionListener
Direct Known Subclasses:
AdminNoteAction, AlterAction, AlterKillAction, BanAction, GagAction, GhostModeAction, InspectAction, InspectKillAction, InspectQuestAction, InvisibleAction, JailAction, JailReportAction, RemoteViewAction, StoreMessageOnBehalfOfPlayerAction, SummonAction, SummonAtAction, SupportAnswerAction, TeleClickModeAction, TeleportAction, TeleportToAction, TellAllAction

public abstract class AdministrationAction extends Object implements ActionListener
Most /commands for admins are handled here.
  • Field Details

    • REQUIRED_ADMIN_LEVEL_FOR_SUPPORT

      public static final int REQUIRED_ADMIN_LEVEL_FOR_SUPPORT
      See Also:
      Constant Field Values
    • REQUIRED_ADMIN_LEVEL_FOR_SUPER

      public static final int REQUIRED_ADMIN_LEVEL_FOR_SUPER
      See Also:
      Constant Field Values
    • logger

      protected static final org.apache.log4j.Logger logger
  • Constructor Details

    • AdministrationAction

      public AdministrationAction()
  • Method Details

    • registerActions

      public static void registerActions()
    • registerCommandLevel

      public static void registerCommandLevel(String command, int minLevel)
    • getLevelForCommand

      public static Integer getLevelForCommand(String command)
    • isPlayerAllowedToExecuteAdminCommand

      public static boolean isPlayerAllowedToExecuteAdminCommand(Player player, String command, boolean verbose)
    • onAction

      public final void onAction(Player player, RPAction action)
      Description copied from interface: ActionListener
      processes the requested action.
      Specified by:
      onAction in interface ActionListener
      Parameters:
      player - the caller of the action
      action - the action to be performed
    • perform

      protected abstract void perform(Player player, RPAction action)
    • getTargetAnyZone

      protected final Entity getTargetAnyZone(Player player, RPAction action)
    • getTarget

      protected final Entity getTarget(Player player, RPAction action)
      get the Entity-object of the specified target.
      Parameters:
      player -
      action -
      Returns:
      the Entity or null if it does not exist