-
Notifications
You must be signed in to change notification settings - Fork 6
Command API
SirBlobman edited this page Aug 19, 2022
·
5 revisions
With BlueSlimeCore, you can create commands.
Available Classes:
Command
PlayerCommand
ConsoleCommand
To create a custom command, you just need to create a new class file. You can see an example in the source for the core plugin:
CommandSirBlobmanCore Class Example
You also need to register the command in your plugin.yml and in your main class:
CommandSirBlobmanCore plugin.yml Example
CommandSirBlobmanCore Register Example
Custom commands can have sub commands and custom permission nodes. BlueSlimeCore will automatically tab-complete sub commands and check permissions when necessary. There are also some built-in methods in the command classes for giving items, checking targets, and parsing numbers from arguments.