public abstract class AbstractCommand extends java.lang.Object implements Command
Command
implementations.Modifier | Constructor and Description |
---|---|
protected |
AbstractCommand(@NotNull java.lang.String commandName,
@NotNull CrossfireServerConnection crossfireServerConnection)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawInfo(@NotNull java.lang.String message)
Displays a regular output message.
|
protected void |
drawInfo(@NotNull java.lang.String message,
int color)
Displays a message.
|
protected void |
drawInfoError(@NotNull java.lang.String message)
Displays an error message.
|
@NotNull java.lang.String |
getCommandName()
Returns the name of the command.
|
@NotNull java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allArguments, execute, getHelp
protected AbstractCommand(@NotNull @NotNull java.lang.String commandName, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection)
commandName
- the name of the commandcrossfireServerConnection
- the connection instanceprotected void drawInfo(@NotNull @NotNull java.lang.String message)
message
- the messageprotected void drawInfoError(@NotNull @NotNull java.lang.String message)
message
- the error messageprotected void drawInfo(@NotNull @NotNull java.lang.String message, int color)
message
- the messagecolor
- the color code@NotNull public @NotNull java.lang.String getCommandName()
Command
getCommandName
in interface Command
@NotNull public @NotNull java.lang.String toString()
toString
in class java.lang.Object