public class ExecuteCommandCommand extends java.lang.Object implements GUICommand2
GUICommand
which executes a Crossfire command.Constructor and Description |
---|
ExecuteCommandCommand(@NotNull CommandExecutor commandExecutor,
@NotNull java.lang.String command,
@NotNull Macros macros)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Returns whether this command may be executed.
|
void |
execute()
Executes the command.
|
@NotNull java.lang.String |
getCommandString()
Returns the command as a string.
|
public ExecuteCommandCommand(@NotNull @NotNull CommandExecutor commandExecutor, @NotNull @NotNull java.lang.String command, @NotNull @NotNull Macros macros)
commandExecutor
- the command executor for executing the commandcommand
- the command to executemacros
- the macros instance to usepublic boolean canExecute()
GUICommand
canExecute
in interface GUICommand
public void execute()
GUICommand
GUICommand.canExecute()
returns false
.execute
in interface GUICommand
@NotNull public @NotNull java.lang.String getCommandString()
GUICommand2
getCommandString
in interface GUICommand2