-
Notifications
You must be signed in to change notification settings - Fork 6
Command API
SirBlobman edited this page Apr 29, 2023
·
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:
You also need to register the command in your plugin.yml and in your main class:
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.