Class ExecuteCommandCommand
java.lang.Object
com.realtime.crossfire.jxclient.gui.textinput.ExecuteCommandCommand
- All Implemented Interfaces:
GUICommand,GUICommand2
A
GUICommand which executes a Crossfire command.-
Constructor Summary
ConstructorsConstructorDescriptionExecuteCommandCommand(@NotNull CommandExecutor commandExecutor, @NotNull String command, @NotNull Macros macros) Creates a new instance. -
Method Summary
-
Constructor Details
-
ExecuteCommandCommand
public ExecuteCommandCommand(@NotNull @NotNull CommandExecutor commandExecutor, @NotNull @NotNull String command, @NotNull @NotNull Macros macros) Creates a new instance.- Parameters:
commandExecutor- the command executor for executing the commandcommand- the command to executemacros- the macros instance to use
-
-
Method Details
-
canExecute
public boolean canExecute()Description copied from interface:GUICommandReturns whether this command may be executed.- Specified by:
canExecutein interfaceGUICommand- Returns:
- whether this command may be executed
-
execute
public void execute()Description copied from interface:GUICommandExecutes the command. Does nothing if called whileGUICommand.canExecute()returnsfalse.- Specified by:
executein interfaceGUICommand
-
getCommandString
Description copied from interface:GUICommand2Returns the command as a string.- Specified by:
getCommandStringin interfaceGUICommand2- Returns:
- the command
-