Class CommandManager

java.lang.Object
net.streamlinecloud.api.extension.command.CommandManager

public class CommandManager extends Object
  • Field Details

  • Constructor Details

    • CommandManager

      public CommandManager()
  • Method Details

    • registerCommand

      public void registerCommand(CommandListener commandListener) throws CommandException
      Register a command
      Parameters:
      commandListener - Command Listener to register
      Throws:
      CommandException - If a command with the same name already exists
    • unregisterCommand

      public void unregisterCommand(String name)
      Unregisters a command
      Parameters:
      name - Name of the Command
    • executeCommand

      public void executeCommand(String name, String[] args)
      Execute a command
      Parameters:
      name - Name of the command
      args - Arguments for the command
      Throws:
      CommandException - If the command does not exist