Developer API
Get the API with McAnticheatAPI.get() (null while the plugin is off). Add mcAnticheat as a softdepend or depend. The classes are in dev.technotypist.mcanticheat.api.
McAnticheatAPI api = McAnticheatAPI.get();
double risk = api.getRiskScore(player); // join gate, 0 to 100
double vl = api.getViolationLevel(player, "speed"); // one check
double total = api.getTotalViolationLevel(player);
api.setExempt(player.getUniqueId(), true); // until restart
api.setCheckExempt(player.getUniqueId(), "reach", true);
Your own check#
var mine = api.registerCheck("my-check", "My check", Category.WORLD, "What it does");
mine.flag(player, "Did the thing 5 times", Map.of("count", 5));
A registered check appears in checks.yml and the panel with its own settings, and gets alerts, violation levels, actions, replays and the audit trail. You can also extend Check yourself and pass it to registerCheck(Check). unregisterCheck(id) removes it.
Other methods#
getGateResult(player): the join gate result (brand, channels, signals, risk).getViolationLevels(player): all current levels.getCheckIds(),isBedrock(player).