MonGen's Cave Docs
  • Welcome here!
  • Premium Products
    • mc-DiscordLink
      • Plugin FAQ
      • Commands
      • Feature Help
        • Setup Discord Bot
        • Link System
        • Embed Builder
      • Supported Plugins
        • Rank Plugins
        • PlaceholderAPI
        • DiscordLinkProxy
        • Floodgate
      • Migrate Data
    • mc-KillStats
      • Plugin FAQ
      • Supported Plugins
      • Commands
      • Hooks
        • PlaceholderAPI
      • Developer API
    • mc-Levels
      • Plugin FAQ
      • Commands
      • Supported Plugins
        • PlaceholderAPI
        • AxBooster
      • Developer API
    • mc-Credits
      • Plugin FAQ
      • Commands
      • Feature Help
        • GUI Options
      • Supported Plugins
        • PlaceholderAPI
      • Developer API
    • mc-Homes
      • Plugin FAQ
      • Commands
      • Feature Help
        • Safe Teleport
        • Home Name
  • Free Products
    • mc-FunGun
      • Plugin FAQ
      • Supported Plugins
      • Commands
    • mc-PlayerVisibility
      • Plugin FAQ
      • Supported Plugins
      • Commands
    • mc-IPGuard
      • Plugin FAQ
      • Supported Plugins
      • Commands
    • mc-Scheduler
      • Plugin FAQ
      • Commands
      • Supported Plugins
        • PlaceholderAPI
  • REACH US HERE
  • Discord Support
  • BuiltByBit
  • SpigotMC
  • Polymart
Powered by GitBook
On this page
  • Add the Dependency
  • Add mc-KillStats to plugin.yml
  • Example how to use the KillStatsAPI
  1. Premium Products
  2. mc-KillStats

Developer API

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

PreviousPlaceholderAPINextmc-Levels

Last updated 2 months ago

Add the Dependency

Don't forget to change always the version!

<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>
maven { url "https://repo.mongenscave.com/releases" }

implementation "com.mongenscave:mc-KillStatsAPI:[VERSION]"

Add mc-KillStats to plugin.yml

depend:
  - mc-KillStats
softdepend:
  - 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!");
}