registerKraftlinCommands

fun Plugin.registerKraftlinCommands(vararg commands: KraftlinPaperCommand)

Registers one or more Kraftlin commands for this plugin.

This function hooks into Paper's LifecycleEvents.COMMANDS phase and registers the provided commands when the server builds its command graph.

This is intended to be called during plugin initialization (e.g. in onEnable). Calling it multiple times is supported but will register multiple lifecycle handlers and is therefore unnecessary in most cases.

Set overrideAliases = true on a KraftlinPaperCommand to force alias registration to override existing commands.

Parameters

commands

one or more Kraftlin commands to register

See also