Getting started
Getting the API
import com.kammoun.api.ZelBountyAPI;
import com.kammoun.api.BountyAPI;
import com.kammoun.api.PlayerDataAPI;
public class MyPlugin extends JavaPlugin {
private ZelBountyAPI zelBountyAPI;
private BountyAPI bountyAPI;
private PlayerDataAPI playerDataAPI;
@Override
public void onEnable() {
// Get the main API
zelBountyAPI = Bukkit.getServicesManager().load(ZelBountyAPI.class);
if (zelBountyAPI == null) {
getLogger().warning("ZelBounty not found!");
return;
}
// Check if enabled
if (!zelBountyAPI.isEnabled()) {
getLogger().warning("ZelBounty is not enabled!");
return;
}
// Get sub-APIs
bountyAPI = zelBountyAPI.getBountyAPI();
playerDataAPI = zelBountyAPI.getPlayerDataAPI();
getLogger().info("ZelBounty API loaded! Version: " + zelBountyAPI.getVersion());
}
}API Components
ZelBountyAPI
Maven/Gradle Dependency
plugin.yml
Gradle
Thread Safety
Async Example
Exception Handling
Exception
Description
Last updated
