diff options
author | Petr Ilin <hevav@hevav.dev> | 2022-01-12 20:37:41 +0300 |
---|---|---|
committer | Petr Ilin <hevav@hevav.dev> | 2022-01-12 20:37:41 +0300 |
commit | cd582dcd5ca096b3e590faed745b6212a44eadcb (patch) | |
tree | 60563ce71aa18c07fbbf4203113a71f1c24dd467 /src | |
parent | 46ebeb6f62a664294fa19f995d683fa6f43a2c34 (diff) | |
download | LimboAuth-cd582dcd5ca096b3e590faed745b6212a44eadcb.tar.gz LimboAuth-cd582dcd5ca096b3e590faed745b6212a44eadcb.tar.bz2 LimboAuth-cd582dcd5ca096b3e590faed745b6212a44eadcb.zip |
BStats custom charts
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/elytrium/limboauth/LimboAuth.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java index ad54496..1fc61a4 100644 --- a/src/main/java/net/elytrium/limboauth/LimboAuth.java +++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java @@ -79,6 +79,7 @@ import net.elytrium.limboauth.model.RegisteredPlayer; import net.elytrium.limboauth.utils.UpdatesChecker; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import net.kyori.adventure.title.Title; +import org.bstats.charts.SimplePie; import org.bstats.velocity.Metrics; import org.slf4j.Logger; @@ -132,11 +133,19 @@ public class LimboAuth { @Subscribe public void onProxyInitialization(ProxyInitializeEvent event) throws Exception { - this.metricsFactory.make(this, 13700); + Metrics metrics = this.metricsFactory.make(this, 13700); System.setProperty("com.j256.simplelogging.level", "ERROR"); this.reload(); + metrics.addCustomChart(new SimplePie("floodgate_auth", () -> String.valueOf(Settings.IMP.MAIN.FLOODGATE_NEED_AUTH))); + metrics.addCustomChart(new SimplePie("premium_auth", () -> String.valueOf(Settings.IMP.MAIN.ONLINE_MODE_NEED_AUTH))); + metrics.addCustomChart(new SimplePie("db_type", () -> Settings.IMP.DATABASE.STORAGE_TYPE)); + metrics.addCustomChart(new SimplePie("load_world", () -> String.valueOf(Settings.IMP.MAIN.LOAD_WORLD))); + metrics.addCustomChart(new SimplePie("totp_enabled", () -> String.valueOf(Settings.IMP.MAIN.ENABLE_TOTP))); + metrics.addCustomChart(new SimplePie("dimension", () -> Settings.IMP.MAIN.DIMENSION)); + metrics.addCustomChart(new SimplePie("save_uuid", () -> String.valueOf(Settings.IMP.MAIN.SAVE_UUID))); + UpdatesChecker.checkForUpdates(this.getLogger()); } |