Class AgainCommand

  • All Implemented Interfaces:
    Command

    public class AgainCommand
    extends AbstractCommand
    Implements the "again" command. It repeats the previously executed command.
    • Constructor Detail

      • AgainCommand

        public AgainCommand​(@NotNull
                            @NotNull CrossfireServerConnection crossfireServerConnection,
                            @NotNull
                            @NotNull CommandExecutor commandExecutor,
                            @NotNull
                            @NotNull CommandHistory commandHistory)
        Creates a new instance.
        Parameters:
        crossfireServerConnection - the connection instance
        commandExecutor - the command executor for executing the commands
        commandHistory - the command history for determining the command to execute
    • Method Detail

      • allArguments

        public boolean allArguments()
        Description copied from interface: Command
        Returns whether all remaining commands should be included as arguments.
        Returns:
        whether all remaining commands should be included as arguments
      • execute

        public void execute​(@NotNull
                            @NotNull java.lang.String args)
        Description copied from interface: Command
        Executes the command with the given arguments.
        Parameters:
        args - the command arguments