Developer 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-PrivateGames as a softdepend like softdepend: [BedWars1058-PrivateGames]

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-PrivateGames") == null) {
        getLogger().severe("BedWars1058 Priate Games Addon wasn't found. Disabling...");

6. Initializing the API

PrivateGames privateGamesAPI = Bukkit.getServicesManager().getRegistration(PrivateGames.class).getProvider();