Server interface
A read-only view of the server Venus is running on, plus the profiler and a configuration reload.
| Signature | Description |
|---|---|
UUID uuid() | Stable per-installation identifier, derived once from the server name and data folder. |
String name() | The resolved server name — see domain verification for the resolution order. |
String version() | The Venus build version, e.g. 1.1.2. |
Monitor monitor() | Timing statistics; see Monitor and Statistic. |
boolean cloudConnected() | Whether the cloud link is up right now. |
double tps() | Current server TPS, or 20 when the platform cannot report it. |
int onlinePlayers() | Players the platform reports as online, falling back to the tracked count. |
void reloadConfig() | Reloads the configuration files. |
VenusApi api = VenusAPIProvider.get();
// Reload the configuration from a plugin-owned command.
api.server().reloadConfig();
api.reload().thenAccept(success ->
getLogger().info("Venus reload " + (success ? "finished" : "did not run")));
// Tick, prediction and store timings, in milliseconds.
Monitor monitor = api.server().monitor();
getLogger().info("tick " + monitor.tickTimings().runningMedian()
+ "ms, prediction " + monitor.predictionTimings().runningAverage() + "ms");Notes
uuid()is derived from the server name and the plugin data folder, so it is stable for a given installation but different between copies of the same server. Use it as a cache key, not as a licence identifier.tps()is a platform call. On a platform that cannot answer it returns the neutral20rather than an error, so a dashboard does not show a false alarm.onlinePlayers()is the platform's count. It can exceed the number of users Venus tracks — exempt or not-yet-built players are tracked by the server but not checked. Compare withusers().size()when the distinction matters.