Eluinhost/pluginframework — pull request #20 by Eluinhost (2014-08-26 11:26:42+00:00)
Title: Support subcommands

Supports subcommands using the @CommandMethod annotation
```
@CommandMethod(command = "feature")
...method....

@CommandMethod(command = "feature list")
...method...

@CommandMethod(command = "feature list something")
...method...
```
The above would register all 3 methods for the command `feature`. Will only ever run against the method with the largest applicable command.

`/feature list` - Would choose `feature` and `feature list`. `feature list` has a longer argument list so it is chosen

`/feature list something` - Would choose all above methods, only `feature list something` triggers

`/feature something` - Only triggers `feature`.

If only subcommands are registered and no route command first it will attempt to send a message based on if you have set the default message for the command in the router, if no will return false and Bukkit will show the value from the plugin.yml