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
Abstract base class for
Command implementations.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCommand(@NotNull String commandName, @NotNull CrossfireServerConnection crossfireServerConnection) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDisplays a regular output message.protected voidDisplays a message.protected voiddrawInfoError(@NotNull String message) Displays an error message.@NotNull StringReturns the name of the command.@NotNull StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.realtime.crossfire.jxclient.commands.Command
allArguments, execute, getHelp
-
Constructor Details
-
AbstractCommand
protected AbstractCommand(@NotNull @NotNull String commandName, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection) Creates a new instance.- Parameters:
commandName- the name of the commandcrossfireServerConnection- the connection instance
-
-
Method Details
-
drawInfo
Displays a regular output message.- Parameters:
message- the message
-
drawInfoError
Displays an error message.- Parameters:
message- the error message
-
drawInfo
Displays a message.- Parameters:
message- the messagecolor- the color code
-
getCommandName
Description copied from interface:CommandReturns the name of the command.- Specified by:
getCommandNamein interfaceCommand- Returns:
- the name
-
toString
-