Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haq/ample
A basic annotation-based command system for Spigot.
https://github.com/haq/ample
annotation annotations java spigot
Last synced: 3 months ago
JSON representation
A basic annotation-based command system for Spigot.
- Host: GitHub
- URL: https://github.com/haq/ample
- Owner: haq
- License: mit
- Created: 2018-04-28T16:23:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-31T00:44:32.000Z (about 4 years ago)
- Last Synced: 2023-03-05T09:56:56.954Z (almost 2 years ago)
- Topics: annotation, annotations, java, spigot
- Language: Java
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![license](https://img.shields.io/github/license/mashape/apistatus.svg) ](LICENSE)
[![](https://jitpack.io/v/haq/ample.svg)](https://jitpack.io/#haq/ample)# ample
A basic annotation based command system for Spigot. You do no need to declare the commands in plugin.yml as it will
register the commands for you.## Todo
* Subcommands
## Usage
```java
public class TestPlugin extends JavaPlugin {@Override
public void onEnable() {
new Ample(this) // passing in java plugin, so it can get plugin name
.register(this); // the objects that contain the command annotated methods
}//every command method needs this annotation
@Command(
value = "Test",
description = "Test command",
usage = "test ",
alias = {"tst", "t"}
)
@PlayerOnly // tag a method with this annotation if you want that command to be run by a player only
@Permission("example.perm") // tag a method with this if the command has a permission requirement
public void test(CommandSender commandSender, int arg1, double arg2, String arg3) {
System.out.println("TEST COMMAND!");
}
}
```## Download
```xml
jitpack.io
https://jitpack.io```
```xml
com.github.haq
ample
VERSION```