API Documentation

Table of Contents

I'll keep this simple and to the point. How to make your plugin compatible:

Step 1: What is this

If you have a plugin that modifies player speed or other things that could cause AntiCheat to think a player is hacking, you can easily keep your plugin functional by hooking into AntiCheat's API. First, determine the places in your code where you will be changing player's behavior. You then have two choices:

Exempt a player from the check momentarily -
If you only modify player behavior for a while and then switch back to a vanilla system, the best thing to do is to use the exempt methods. This allows a player to not enter a certain check until you say they should.

Turn off an entire check -
If your plugin modifies everyone on the server's behavior for short or extended periods of time, it would be better to turn off the check so that nobody gets affected by it.

Step 2: How do I use it

Code time. You'll need to import AntiCheat as a library to your project. You did this with craftbukkit/bukkit to make your plugin, now do it with AntiCheat.jar. If you don't know how/don't remember how to do this, google search "libraries" or "dependencies" with the name of your IDE.

The AntiCheat repository is located at http://repo.gravitydevelopment.net/ - if you're using Maven, follow the instructions on that page to add the repository to your maven pom.xml, then add AntiCheat as a dependency:

Step 3: This is really important :S

Last but certainly not least, you want to make sure AntiCheat loads before your plugin does, that way you are able to use the API. Head to your plugin.yml and add:

softdepend:[AntiCheat]

If you happen to already been softdepending another plugin, just add it like so:

softdepend:[Vault,AntiCheat]

And that's all there is. If you want to read the documentation for the API, head over here: http://gravitydevelopment.net/docs/anticheat/ (or more specifically HERE for information about the AntiCheatAPI, which is the only class you should really ever need to bother with.)