From 59e82c707893ba7914b9f42a81b4f0d99be0ab7d Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Sun, 5 Feb 2023 22:02:10 +0100 Subject: [PATCH] Add metrics for settings as separate charts bStats has unfortunately not implemented advanced bar charts in years and not accepted my PR for it either :( We do it the hart way then... --- src/main/java/com/Acrobot/ChestShop/ChestShop.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/Acrobot/ChestShop/ChestShop.java b/src/main/java/com/Acrobot/ChestShop/ChestShop.java index 3613374..21fdc76 100644 --- a/src/main/java/com/Acrobot/ChestShop/ChestShop.java +++ b/src/main/java/com/Acrobot/ChestShop/ChestShop.java @@ -468,6 +468,17 @@ public class ChestShop extends JavaPlugin { bStats.addCustomChart(new SimplePie("includeSettingsInMetrics", () -> Properties.INCLUDE_SETTINGS_IN_METRICS ? "enabled" : "disabled")); if (!Properties.INCLUDE_SETTINGS_IN_METRICS) return; + bStats.addCustomChart(new SimplePie("ensure-correct-playerid", () -> Properties.ENSURE_CORRECT_PLAYERID ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("allow-sign-chest-open", () -> Properties.ALLOW_SIGN_CHEST_OPEN ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("uses-server-economy-account", () -> !Properties.SERVER_ECONOMY_ACCOUNT.isEmpty() ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("uses-server-economy-account-uuid", () -> !Properties.SERVER_ECONOMY_ACCOUNT_UUID.equals(new UUID(0, 0)) ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("allow-partial-transactions", () -> Properties.ALLOW_PARTIAL_TRANSACTIONS ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("bungeecord-messages", () -> Properties.BUNGEECORD_MESSAGES ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("allow-multiple-shops-at-one-block", () -> Properties.ALLOW_MULTIPLE_SHOPS_AT_ONE_BLOCK ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("allow-partial-transactions", () -> Properties.ALLOW_PARTIAL_TRANSACTIONS ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("log-to-console", () -> Properties.LOG_TO_CONSOLE ? "enabled" : "disabled")); + bStats.addCustomChart(new SimplePie("log-to-file", () -> Properties.LOG_TO_FILE ? "enabled" : "disabled")); + bStats.addCustomChart(new AdvancedBarChart("pluginProperties", () -> { Map map = new LinkedHashMap<>(); map.put("ensure-correct-playerid", getChartArray(Properties.ENSURE_CORRECT_PLAYERID));