Delevoper API

1. Join my Discord server create a new ticket and ask for the API jar file.

2. Create a new Maven project and put the jar file into the {projectDirectory}/libraries directory.

3. Open the project's pom.xml file and add this as a dependency.

<dependency>
    <groupId>club.mher</groupId>
    <artifactId>cosmetics-api</artifactId>
    <version>x.x.x</version>
    <scope>system</scope>
    <systemPath>${project.basedir}\libraries\cosmetics-api-x.x.x.jar</systemPath>
</dependency>

4. Make sure to add the BedWars1058-Cosmetics as a softdepend like softdepend: [BedWars1058-Cosmetics]

5. Checking if the plugin exists on the server on onEnable method.

@Override
public void onEnable() {
    // Disable if the addon doesn't exists
    if (Bukkit.getPluginManager().getPlugin("BedWars1058-Cosmetics") == null) {
        getLogger().severe("BedWars1058 Cosmetics Addon wasn't found. Disabling...");
        setEnabled(false);
        return;
    }
}

6. Initializing the API

CosmeticsAPI cosmeticsApi = Bukkit.getServicesManager().getRegistration(CosmeticsAPI.class).getProvider();