Class CommandRegistry

java.lang.Object
io.github.dexrnzacattack.rrdiscordbridge.command.CommandRegistry

public class CommandRegistry extends Object
Registry of all in-game commands
  • Constructor Details

    • CommandRegistry

      public CommandRegistry()
  • Method Details

    • register

      public CommandRegistry register(ICommand command)
      Registers a command
      Parameters:
      command - The command instance to register
      Returns:
      The command registry
    • unregister

      public CommandRegistry unregister(CommandRegistry.CommandName name)
      Unregisters a command
      Parameters:
      name - The enum key (name) of the command to unregister
      Returns:
      The command registry
    • getCommand

      public ICommand getCommand(CommandRegistry.CommandName name)
      Gets a command by its enum key
      Parameters:
      name - The name of the command
      Returns:
      The command (if found)