Class AbstractCommand

java.lang.Object
com.realtime.crossfire.jxclient.commands.AbstractCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AgainCommand, BindCommand, BindingsCommand, ClearCommand, DebugMessagesCommand, ExecCommand, HelpCommand, ScreenshotCommand, ScriptCommand, ScriptkillallCommand, ScriptkillCommand, ScriptsCommand, ScripttellCommand, SetCommand, ShortcutCommand, UnbindCommand

public abstract class AbstractCommand extends Object implements Command
Abstract base class for Command implementations.
  • Constructor Details

    • AbstractCommand

      protected AbstractCommand(@NotNull @NotNull String commandName, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection)
      Creates a new instance.
      Parameters:
      commandName - the name of the command
      crossfireServerConnection - the connection instance
  • Method Details

    • drawInfo

      protected void drawInfo(@NotNull @NotNull String message)
      Displays a regular output message.
      Parameters:
      message - the message
    • drawInfoError

      protected void drawInfoError(@NotNull @NotNull String message)
      Displays an error message.
      Parameters:
      message - the error message
    • drawInfo

      protected void drawInfo(@NotNull @NotNull String message, int color)
      Displays a message.
      Parameters:
      message - the message
      color - the color code
    • getCommandName

      @NotNull public @NotNull String getCommandName()
      Description copied from interface: Command
      Returns the name of the command.
      Specified by:
      getCommandName in interface Command
      Returns:
      the name
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Object