Enum Class CommandType

java.lang.Object
java.lang.Enum<CommandType>
com.realtime.crossfire.jxclient.gui.commands.CommandType
All Implemented Interfaces:
Serializable, Comparable<CommandType>, Constable

public enum CommandType extends Enum<CommandType>
The executable commands.
  • Enum Constant Details

    • APPLY

      public static final CommandType APPLY
      Apply an item.
    • DROP

      public static final CommandType DROP
      Drop an item (to the ground of into an opened container).
    • EXAMINE

      public static final CommandType EXAMINE
      Examine an item.
    • LOCK

      public static final CommandType LOCK
      Lock an item.
    • LOCK_TOGGLE

      public static final CommandType LOCK_TOGGLE
      Toggle the lock of an item.
    • MARK

      public static final CommandType MARK
      Mark an item.
    • UNLOCK

      public static final CommandType UNLOCK
      Unlock an item.
  • Method Details

    • values

      public static CommandType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CommandType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • canExecute

      public static boolean canExecute(@Nullable @Nullable GUIItemItem guiItem)
      Returns whether the action can be executed.
      Parameters:
      guiItem - the item to check for
      Returns:
      whether the action can be executed
    • execute

      public void execute(@Nullable @Nullable GUIItemItem guiItem, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection, int floor, @NotNull @NotNull CommandQueue commandQueue)
      Executes the action.
      Parameters:
      guiItem - the item to execute on
      crossfireServerConnection - the server connection to use
      floor - the current floor index
      commandQueue - the command queue to use
    • doExecute

      protected abstract void doExecute(@NotNull @NotNull CfItem item, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection, int floor, @NotNull @NotNull CommandQueue commandQueue)
      Executes the action.
      Parameters:
      item - the item to execute on
      crossfireServerConnection - the server connection to use
      floor - the current floor index
      commandQueue - the command queue to use