Enhanced plugin development. Split your plugin into flexible modules.
<!-- Repository -->
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<!-- Dependency-->
<dependencies>
<dependency>
<groupId>com.github.jbwm</groupId>
<artifactId>Modularize</artifactId>
<version>1.3.0</version>
</dependency>
</dependencies>
Register module manager on plugin startup
@Module annotation register class as Module.
@Listen annotation automatically register class as Listener.
@Command annotation register command. It has few optional and required parameters.
Nothing else is required, you don't have to register command or listener manually in main class. You don't need also to fill plugin.yml
Don't forget that TabExecutor or Listener interfaces are still required.
CommandExecutor is currently not supported, instead use TabExecutor which force usage of tab completer.
Use interface initializable on class, if you want to do something during initialization. (Load inventories, load data from config and so on.)
Use interface reloadable on class, if you want to do something when module is reloaded.
if class is annotated with @Module AND @Listen or @Command, it becomes a module.
Annotated class is added to config.yml to path 'modules.<module_name>'. You don't have to add it manually, it will be added manually with value true.
Reloading specific module
Reloading all modules at once.
Note: Reloading also affect default config.yml -> If you disabled specific module in config.yml change will be affected, and module enabled/disabled.
Code samples are available in example directory in project