🖍️How to create addon?

Addon can be created like a simple Spigot plugin.

Addon has plugin.yml and addon.yml files.

Getting started

Add dependency

 <dependency>
    <groupId>com.github.timsixth.MinigameAPI</groupId>
   <artifactId>addons-api</artifactId>
   <version>version</version>
   <scope>provided</scope>
</dependency>

How to create a main class?

public class MysMiniGameAddon extends MiniGameAddon {

    @Override
    public void onEnable() {
        super.onEnable(); //this is important
        //code...
    }
}

How to register sub-commands?

Addon can add sub-commands to two main minigame commands (Admin and player command).

addAdminSubCommand(new MyAdminSubCommand());
addPlayerSubCommand(new MyPlayerSubCommand());

How to use the loaders class with an addon?

UserDBLoader userDbLoader = new UserDBLoader();

getLoaders().registerLoaders(userDbLoader);
getLoaders().load(userDbLoader);

How to create addon.yml?

name: 'MyMiniGameAddon' #required, it is the id of addon 
displayName: 'MyMiniGameAddon' #required, it will be shown on addon list 
repository: 'timsixth/MyMiniGameAddon' #optional, only to download from github