The Command Manager

An introduction to the command manager

The CommandManager class is the central class that manages all your commands. On the Paper platform it can be instantiated via PaperCommandManager.create(Plugin):

PaperCommandManager commandManager = PaperCommandManager.create(plugin)

Command Registration

You can register a command by calling CommandManager.registerCommand(Object). The Object argument is an object annotated with @Command.

@Command("example")
class Example {}

commandManager.registerCommand(new Example());

Learn about commands.

Last updated