SDK Installation
Add the ServerStats SDK to your Minecraft plugin project.
Add Dependency
<repositories><repository><id>serverstats</id><url>https://maven.serverstats.com/repository/maven-releases/</url></repository></repositories><dependencies><dependency><groupId>com.serverstats</groupId><artifactId>serverstats-api</artifactId><version>0.4.0</version><scope>provided</scope></dependency></dependencies>
Plugin Dependency
Make sure your plugin loads after ServerStats:
dependencies:server:ServerStats:load: BEFORErequired: true
Soft Dependency (Optional)
If you want your plugin to work with or without ServerStats, use softdepend:
softdepend: [ServerStats]
Then check availability before using:
if (ServerStats.isAvailable()) {ServerStats.trackEvent("my_event").withPlayer(player.getUniqueId(), player.getName()).send();}
Verify Installation
@Overridepublic void onEnable() {if (ServerStats.isAvailable()) {getLogger().info("ServerStats SDK connected!");} else {getLogger().warning("ServerStats plugin not found");}}