WorkerProcessor
@PLUGIN annotation processor for Spigot plugins
Usage
Everybody who wrote any plugin in BukkitAPI knows, that plugin.yml creating is so boring and old. With this annoation, you can forget plugin.yml file.
Just find your main class what extends
JavaPlugin and annotated it with
@PLUGIN like this:
Code (Java):
@Plugin
(
name
=
"TestPlugin",
main
=
"cz.maku.test.TestPluginMain",
authors
=
"itIsMaku"
)
There is many options in this annotation (
* = required):
- String name
*
- String description
- String main
*
- String[] authors
*
- String version
- String apiVersion
- String[] softDepends
- String[] depends
- String website
Maybe you ask.. where i need to write commands!? Nowhere.
Just register commands in onEnable with
WorkerUtils class. There is this class, because full framework is not released yet, but will be on new year.
Code (Java):
WorkerUtils.
registerCommand
(CommandExecutor commandExecutor,
String fallbackPrefix,
String command,
String description,
String usage,
String...
aliases
)
;
WorkerUtils.
registerCommand
(CommandExecutor commandExecutor,
String fallbackPrefix,
String command
)
;
You can find full documentation on github page.