public class AgainCommand extends AbstractCommand
Modifier and Type | Field and Description |
---|---|
private CommandExecutor |
commandExecutor
The
CommandExecutor for executing the commands. |
private CommandHistory |
commandHistory
The
CommandHistory for determining the command to execute. |
Constructor and Description |
---|
AgainCommand(CrossfireServerConnection crossfireServerConnection,
CommandExecutor commandExecutor,
CommandHistory commandHistory)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allArguments()
Returns whether all remaining commands should be included as arguments.
|
void |
execute(java.lang.String args)
Executes the command with the given arguments.
|
drawInfo, drawInfo, drawInfoError, getCommandName, toString
@NotNull private final CommandExecutor commandExecutor
CommandExecutor
for executing the commands.@NotNull private final CommandHistory commandHistory
CommandHistory
for determining the command to execute.public AgainCommand(@NotNull CrossfireServerConnection crossfireServerConnection, @NotNull CommandExecutor commandExecutor, @NotNull CommandHistory commandHistory)
crossfireServerConnection
- the connection instancecommandExecutor
- the command executor for executing the commandscommandHistory
- the command history for determining the command to
executepublic boolean allArguments()
public void execute(@NotNull java.lang.String args)
args
- the command arguments