Skip to content

Commit

Permalink
feat: upload server version to bStats
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Jan 3, 2025
1 parent 7957b82 commit 0b863e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Unless otherwise specified, any version comparison below is the comparison of se
- Implemented most of the crops, including wheat, potato, carrot, beetroot, melon and pumpkin.
- Introduced [sentry](https://www.sentry.io) to capture exception and upload them to sentry server automatically, which
helps us to track and fix bug more efficiently. Sentry is only enabled in non-dev version.
- Server version will also be uploaded to bStats now.

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ public static void startMetrics() {
metrics.addCustomChart(new Metrics.SingleLineChart("players", server::getOnlinePlayerCount));
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", ProtocolInfo::getMinecraftVersionStr));
metrics.addCustomChart(new Metrics.SimplePie("allay_api_version", GitProperties::getBuildApiVersion));
metrics.addCustomChart(new Metrics.SimplePie("allay_server_version", GitProperties::getBuildVersion));
metrics.addCustomChart(new Metrics.SimplePie("max_memory", () -> String.format("%.2f", Runtime.getRuntime().maxMemory() / (1024d * 1024d * 1024d)) + "G"));
metrics.addCustomChart(new Metrics.SimplePie("xbox_auth", () -> Server.SETTINGS.networkSettings().xboxAuth() ? "Required" : "Not required"));

Expand Down

0 comments on commit 0b863e7

Please sign in to comment.