public class ExecSelectionCommand extends java.lang.Object implements GUICommand
GUICommand
that executes a command on the selected item of a
GUIItemList
.Constructor and Description |
---|
ExecSelectionCommand(@NotNull GUIItemList<?> list,
@NotNull CommandType command,
@NotNull CrossfireServerConnection crossfireServerConnection,
@NotNull FloorView floorView,
@NotNull CommandQueue commandQueue)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Returns whether this command may be executed.
|
void |
execute()
Executes the command.
|
public ExecSelectionCommand(@NotNull @NotNull GUIItemList<?> list, @NotNull @NotNull CommandType command, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull @NotNull FloorView floorView, @NotNull @NotNull CommandQueue commandQueue)
list
- the list to execute incommand
- the command to executecrossfireServerConnection
- the connection to execute commands onfloorView
- the floor view to usecommandQueue
- the command queue to usepublic boolean canExecute()
GUICommand
canExecute
in interface GUICommand
public void execute()
GUICommand
GUICommand.canExecute()
returns false
.execute
in interface GUICommand