Class CommandManager

java.lang.Object
org.galliumpowered.command.CommandManager

public class CommandManager extends Object
  • Constructor Details

    • CommandManager

      public CommandManager()
  • Method Details

    • registerCommand

      public void registerCommand(Object command, PluginContainer plugin)
      Register a command on the server
      Parameters:
      command - A class instance containing a Command annotation.
      plugin - A PluginContainer instance
    • registerCommand

      public void registerCommand(Object command, PluginMetadata meta)
      Register a command on the server
      Parameters:
      command - A class instance containing a Command annotation.
      meta - A PluginMetadata instance
    • unregisterCommand

      public void unregisterCommand(String alias)
      Unregister a command from the server
      Parameters:
      alias - The alias of the command
    • unregisterAllPluginCommands

      public void unregisterAllPluginCommands(PluginMetadata meta)
      Unregister all commands from a plugin
      Parameters:
      meta - The plugin's metadata
    • getCommands

      public HashMap<String,MCommand> getCommands()
      Command names and their metadata Should not be modified under normal conditions!
      Returns:
      Command names and their metadata
    • getSubcommands

      public HashMap<MCommand,MCommand> getSubcommands()
      Subcommands and their parents Should not be modified under normal conditions!
      Returns:
      Subcommands and their parents