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
| Task | API entry point |
|---|---|
| Look up service | Bukkit.getServicesManager().load(FairPlayService.class) or FairPlayAPI.require(). |
| Subscribe to violations | Use the event bus onViolation method and retain the returned subscription. |
| Read check information | Use getChecks() or getCheck(name). |
| Read or reset violation levels | Use the documented per-player and per-check service methods. |
| Unsubscribe | Close 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.