Interface CommandRegistry
- All Superinterfaces:
Registry
Registry for managing command registration and Brigadier integration.
Provides methods to register, unregister, and configure commands with Brigadier support.
Command registration example:
CommandRegistry registry = flectonePulse.get(CommandRegistry.class);
registry.registerCommand(manager ->
manager.commandBuilder("mycommand")
.permission("myplugin.command")
.handler(context -> {
FPlayer player = context.sender();
player.sendMessage("Command executed!");
})
);
- Since:
- 0.8.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Initializes the command manager and registers exception handlers.voidregisterCommand(Function<org.incendo.cloud.CommandManager<FPlayer>, org.incendo.cloud.Command.Builder<FPlayer>> builder) Registers a new command using the provided builder function.voidunregisterCommand(String name) Unregisters a command by its name.
-
Method Details
-
init
void init()Initializes the command manager and registers exception handlers. -
registerCommand
-
unregisterCommand
Unregisters a command by its name.- Parameters:
name- the name of the command to unregister
-