Class AbstractCommand
- java.lang.Object
-
- com.realtime.crossfire.jxclient.commands.AbstractCommand
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
AgainCommand,BindCommand,BindingsCommand,ClearCommand,DebugMessagesCommand,ExecCommand,ScreenshotCommand,ScriptCommand,ScriptkillallCommand,ScriptkillCommand,ScriptsCommand,ScripttellCommand,SetCommand,UnbindCommand
public abstract class AbstractCommand extends java.lang.Object implements Command
Abstract base class forCommandimplementations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCommand(@NotNull java.lang.String commandName, @NotNull CrossfireServerConnection crossfireServerConnection)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddrawInfo(@NotNull java.lang.String message)Displays a regular output message.protected voiddrawInfo(@NotNull java.lang.String message, int color)Displays a message.protected voiddrawInfoError(@NotNull java.lang.String message)Displays an error message.@NotNull java.lang.StringgetCommandName()Returns the name of the command.@NotNull java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.realtime.crossfire.jxclient.commands.Command
allArguments, execute
-
-
-
-
Constructor Detail
-
AbstractCommand
protected AbstractCommand(@NotNull @NotNull java.lang.String commandName, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection)Creates a new instance.- Parameters:
commandName- the name of the commandcrossfireServerConnection- the connection instance
-
-
Method Detail
-
drawInfo
protected void drawInfo(@NotNull @NotNull java.lang.String message)Displays a regular output message.- Parameters:
message- the message
-
drawInfoError
protected void drawInfoError(@NotNull @NotNull java.lang.String message)Displays an error message.- Parameters:
message- the error message
-
drawInfo
protected void drawInfo(@NotNull @NotNull java.lang.String message, int color)Displays a message.- Parameters:
message- the messagecolor- the color code
-
getCommandName
@NotNull public @NotNull java.lang.String getCommandName()
Description copied from interface:CommandReturns the name of the command.- Specified by:
getCommandNamein interfaceCommand- Returns:
- the name
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-