commands-api
Command libraries for spigot plugin
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.
<dependency>
<groupId>xyz.tozymc.spigot</groupId>
<artifactId>commands-api</artifactId>
<version>2.2</version>
</dependency>
Gradle
Follow this instruction if your build tool is Gradle.
dependencies {
implementation 'xyz.tozymc.spigot:commands-api:2.2'
}
Manual
If your project doesn't have any build tools, you can install it manually.
- Download the library in github release.
- Import
commands-api-2.2.jarfile to your project.
How to use
- Implement command default abstract classes and design your command.
- Declare new
CommandControllerinstance 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
- Javadoc: javadoc.io
- GitHub: github.com
- OSS Index: ossindex.sonatype.org
- Spigot Resources: spigotmc.org
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta