Developer API

Use the KillStats API to retrieve player statistics and validate kills! (Anti Killfarm)

Add the Dependency

Don't forget to change always the version!

KillStatsAPI
<repository>
  <id>MonGens-Cave</id>
  <url>https://repo.mongenscave.com/releases<repository></url>
</repository>

<dependency>
  <groupId>com.mongenscave</groupId>
  <artifactId>mc-KillStatsAPI</artifactId>
  <version>[VERSION]</version>
</dependency>

Add mc-KillStats to plugin.yml

depend:
  - mc-KillStats

Example how to use the KillStatsAPI

For example, use the Anti Killfarm system and validate kills with the API!

KillStatsAPI api = KillStatsAPI.getInstance();

boolean valid = api.isValidKill("Player1", "Player2");
if (valid) {
    System.out.println("This is a valid kill!");
} else {
    System.out.println("Invalid kill!");
}

Last updated