-
Notifications
You must be signed in to change notification settings - Fork 0
Events
shvquu edited this page Jun 13, 2026
·
1 revision
ServerDoctor publishes events on a thread-safe EventBus you can subscribe to from your plugin. Subscribe via ServerDoctorApi.events().
ServerDoctorApi api = ServerDoctorProvider.get();
api.events().subscribe(AnalysisFinishedEvent.class, e -> {
DiagnosticReport report = e.report();
getLogger().info("Scan done, status: " + report.overallSeverity());
});
api.events().subscribe(PluginConflictDetectedEvent.class, e ->
getLogger().warning("Conflict: " + e.conflict().description()));A failing subscriber is isolated and logged — it never breaks other subscribers or the analysis itself.
| Event | Payload | Fired when |
|---|---|---|
AnalysisFinishedEvent |
report() |
A full diagnostic run completes |
PluginConflictDetectedEvent |
conflict() |
A conflict is detected during a run |
SecurityRiskDetectedEvent |
risk() |
A security/maintenance risk is detected |
PerformanceThresholdReachedEvent |
snapshot(), severity(), reason()
|
A performance threshold is crossed |
All events extend ServerDoctorEvent and expose timestamp().
- Subscribers may be invoked from an asynchronous thread (scans run async). If you touch the Bukkit API from a handler, schedule that work back onto the appropriate thread yourself.
ServerDoctor · read-only analysis for Minecraft servers & proxies · MIT · Repository