Skip to content

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:

Command Class Example

You also need to register the command in your plugin.yml and in your main class:

Command plugin.yml Example

Command 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.

Clone this wiki locally