Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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

```