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.

<dependency>
    <groupId>me.mherzaqaryan</groupId>
    <artifactId>private-games-api</artifactId>
    <version>x.x.x</version>
    <scope>system</scope>
    <systemPath>${project.basedir}\libraries\private-games-api-x.x.x.jar</systemPath>
</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.

@Override
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...");
        setEnabled(false);
        return;
    }
}

6. Initializing the API

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