Command, useful method for interacting with players in Spigot plugin. I have realized that the Spigot Command's Api is not functional enough for larger projects. So the commands-api was created to replace it.
The commands-api is very easy to implement, deploy and use. It's compatible with all projects from small to large and any version of Spigot. Working with the root-child model, the root command equivalent to the spigot command and registered as PluginCommand. Reduce pass parameters for simplicity, custom command results, and more.
Notes: This is a library, not a spigot plugin.
Requirements The source code used is java 8. Any java version lower than java 8 will cause errors.
Java 8 or later
Installation There are many ways to install libraries to your plugin dependencies. You can follow this instruction.
Maven Add this section inside <dependencies> tag in your pom.xml.
Implement command default abstract classes and design your command.
Declare new CommandController instance and register implemented commands in the section 1 in the order to the controller declared.
Let's start server and enjoy.
Important Changes Since version 2.0, you don't need to add command to plugin.yml. Why? The major feature update in version 2.0 is dynamic command registration. What is it? Simply, you can register commands anywhere and at any time. Unregistration is similar. So adding command to plugin.yml isn't necessary.
License Distributed under the MIT License. See LICENSE for more information. External Links