java.lang.Object java.lang.Enum<CommandType> com.realtime.crossfire.jxclient.gui.commands.CommandType
public enum CommandType
The executable commands.
Enum Constant Summary | |
---|---|
APPLY
Apply an item. |
|
DROP
Drop an item (to the ground of into an opened container). |
|
EXAMINE
Examine an item. |
|
LOCK
Lock an item. |
|
LOCK_TOGGLE
Toggle the lock of an item. |
|
MARK
Mark an item. |
|
UNLOCK
Unlock an item. |
Method Summary | |
---|---|
static boolean |
canExecute(GUIItemItem guiItem)
Returns whether the action can be executed. |
protected abstract void |
doExecute(CfItem item,
CrossfireServerConnection crossfireServerConnection,
int floor,
CommandQueue commandQueue)
Executes the action. |
void |
execute(GUIItemItem guiItem,
CrossfireServerConnection crossfireServerConnection,
int floor,
CommandQueue commandQueue)
Executes the action. |
static CommandType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static CommandType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final CommandType APPLY
public static final CommandType DROP
public static final CommandType EXAMINE
public static final CommandType LOCK
public static final CommandType LOCK_TOGGLE
public static final CommandType MARK
public static final CommandType UNLOCK
Method Detail |
---|
public static boolean canExecute(@Nullable GUIItemItem guiItem)
guiItem
- the item to check for
protected abstract void doExecute(@NotNull CfItem item, @NotNull CrossfireServerConnection crossfireServerConnection, int floor, @NotNull CommandQueue commandQueue)
item
- the item to execute oncrossfireServerConnection
- the server connection to usefloor
- the current floor indexcommandQueue
- the command queue to usepublic void execute(@Nullable GUIItemItem guiItem, @NotNull CrossfireServerConnection crossfireServerConnection, int floor, @NotNull CommandQueue commandQueue)
guiItem
- the item to execute oncrossfireServerConnection
- the server connection to usefloor
- the current floor indexcommandQueue
- the command queue to usepublic static CommandType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic static CommandType[] values()
for (CommandType c : CommandType.values()) System.out.println(c);