FairPlay Developer API

FairPlay exposes FairPlayService through Bukkit’s ServicesManager and provides an API for checks and violation events.

Artifact coordinates

The public API is version 1.0.0 and is distributed with the api classifier using provided scope. Keep the API version separate from the FairPlay plugin version.

Public API tasks

Public API tasks
TaskAPI entry point
Look up serviceBukkit.getServicesManager().load(FairPlayService.class) or FairPlayAPI.require().
Subscribe to violationsUse the event bus onViolation method and retain the returned subscription.
Read check informationUse getChecks() or getCheck(name).
Read or reset violation levelsUse the documented per-player and per-check service methods.
UnsubscribeClose the retained subscription; plugin disable also cleans up subscriptions.

Cancellation semantics

A listener returning true cancels recording and punishment for that violation. This does not undo check-local packet cancellation, setbacks, or enforcement that occurred before the violation pipeline. A MONITOR listener return value is ignored. Preserve the current cancellation state when observing events unless the integration intentionally owns that decision.

API compatibility

The public API documents a 1.x binary compatibility policy. Internal packages, including transaction implementation types, are not part of that API. The API version is separate from the FairPlay plugin version.

Browse all documentation