Cloud detections and mitigations
The two events the cloud produces, how escalation works, and how per-player cloud state is read.
CloudDetectionEvent
Fired when the cloud reports a detection for a user. It is a UserCancellableEvent — cancelling suppresses the detection before it is recorded anywhere.
public final class CloudDetectionEvent extends UserCancellableEvent {
public @NotNull CloudCheckType type();
public @NotNull Set<String> tags();
public double confidence();
public @NotNull String message();
}api.events().repository().register(CloudDetectionEvent.class, event -> {
User user = event.user();
if (event.confidence() < 0.6) {
event.setCancelled(true);
return;
}
getLogger().info(user.username() + " → " + event.type()
+ " " + String.format("%.0f%%", event.confidence() * 100)
+ " " + event.tags());
});type is a CloudCheckType — the enum reference lists all ten categories and the lenient parse(String) helper. tags is an immutable copy, so iterating it is always safe.
MitigationEvent
Fired when a mitigation is applied to a user. Also cancellable — cancelling prevents the mitigation from taking effect.
public final class MitigationEvent extends UserCancellableCheckEvent {
public @NotNull String mitigation();
}user(), check() and violationLevel() come from the check-event base; mitigation() is the effect name (e.g. hit-cancel, slowdown).
Escalation
- Cloud flags and native check flags both feed the same engine; levels climb
LOW → MEDIUM → HIGH → SEVERE. - For local flags the thresholds are 3 / 5 / 9 / 14 flags within the window (default 30 seconds) for LOW / MEDIUM / HIGH / SEVERE.
- Every new flag refreshes the
mitigation-duration-tickstimer; expiry drops the player back a level. - Ban-wave players hold the SEVERE profile with no expiry until released or pardoned.
Per-player state
if (api.cloud().mitigating(user)) {
String profile = api.cloud().activeProfile(user).orElse("default");
getLogger().info(user.username() + " is mitigated (" + profile + ")");
}
// Keep a player out of cloud classification entirely:
api.exemptions().exemptFromCloud(user, true);Remote punishments
The cloud can also trigger punishment actions directly — an autoban classification, a dashboard action or a released ban wave runs the console command configured for that purpose. Placeholders like the player, the check, the violation level and the confidence are available to those commands; the exact templates are in the shipped cloud configuration file. The local ban-wave controls are on PunishmentService.
Back to the Cloud API overview.