Class CommandManager
java.lang.Object
net.streamlinecloud.api.extension.command.CommandManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeCommand
(String name, String[] args) Execute a commandvoid
registerCommand
(CommandListener commandListener) Register a commandvoid
unregisterCommand
(String name) Unregisters a command
-
Field Details
-
commands
-
-
Constructor Details
-
CommandManager
public CommandManager()
-
-
Method Details
-
registerCommand
Register a command- Parameters:
commandListener
- Command Listener to register- Throws:
CommandException
- If a command with the same name already exists
-
unregisterCommand
Unregisters a command- Parameters:
name
- Name of the Command
-
executeCommand
Execute a command- Parameters:
name
- Name of the commandargs
- Arguments for the command- Throws:
CommandException
- If the command does not exist
-