Interface CommandRegistry
public interface CommandRegistry
Handles and manages all sub-commands for the plugin.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubCommand(ECommand eCommand) Register a sub-command to the registry.voidexecuteCommand(Player player, String command) Execute a config command with the correct syntax.Retrieve a list of all the sub-commands added viaaddSubCommand(ECommand)This doesn't include internal sub-commands provided by the plugin.voidregisterCommandPlaceholder(String placeholder, Function<Player, String> value) Register a config command placeholder.voidremoveSubCommand(String name) Removes a sub-command from the registry.
-
Method Details
-
addSubCommand
Register a sub-command to the registry.- Parameters:
eCommand- The command instance.
-
removeSubCommand
Removes a sub-command from the registry.- Parameters:
name- The command name fromECommand.name.
-
getCommands
Retrieve a list of all the sub-commands added viaaddSubCommand(ECommand)This doesn't include internal sub-commands provided by the plugin.- Returns:
- List of all the sub-commands.
-
executeCommand
Execute a config command with the correct syntax.- Parameters:
player- Player the command will be executed on.command- The command syntax.
-
registerCommandPlaceholder
Register a config command placeholder.- Parameters:
placeholder- The placeholder to replace.value- The value to replace the placeholder with.
-