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.


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.

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...");

6. Initializing the API

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