Class CommandRegistry
java.lang.Object
io.github.dexrnzacattack.rrdiscordbridge.command.CommandRegistry
Registry of all in-game commands
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enum containing the names of all in-game commands -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a command by its enum keyRegisters a commandUnregisters a command
-
Constructor Details
-
CommandRegistry
public CommandRegistry()
-
-
Method Details
-
register
Registers a command- Parameters:
command
- The command instance to register- Returns:
- The command registry
-
unregister
Unregisters a command- Parameters:
name
- The enum key (name) of the command to unregister- Returns:
- The command registry
-
getCommand
Gets a command by its enum key- Parameters:
name
- The name of the command- Returns:
- The command (if found)
-