Class Commands
java.lang.Object
com.realtime.crossfire.jxclient.commands.Commands
Parses and executes client-side commands.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommand
(@NotNull Command command) Adds an executableCommand
.@Nullable Command
findCommand
(@NotNull String commandName) Returns aCommand
by name.@NotNull Collection<String>
Returns all defined commands.
-
Constructor Details
-
Commands
public Commands()
-
-
Method Details
-
addCommand
Adds an executableCommand
.- Parameters:
command
- the command to add
-
getCommands
Returns all defined commands.- Returns:
- the commands in alphabetical order
-
findCommand
Returns aCommand
by name.- Parameters:
commandName
- the command name to search- Returns:
- the command or
null
ifcommandName
is undefined
-