From c586a8af052b1d3a57618488eca97a54046a1cc5 Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Mon, 13 Sep 2021 22:49:49 +0200 Subject: [PATCH] bstats shenanigans for proxy name --- .../waterfall/CommandWhitelistWaterfall.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CommandWhitelistWaterfall/src/main/java/eu/endermite/commandwhitelist/waterfall/CommandWhitelistWaterfall.java b/CommandWhitelistWaterfall/src/main/java/eu/endermite/commandwhitelist/waterfall/CommandWhitelistWaterfall.java index 6785c51..44d0140 100644 --- a/CommandWhitelistWaterfall/src/main/java/eu/endermite/commandwhitelist/waterfall/CommandWhitelistWaterfall.java +++ b/CommandWhitelistWaterfall/src/main/java/eu/endermite/commandwhitelist/waterfall/CommandWhitelistWaterfall.java @@ -32,18 +32,21 @@ public final class CommandWhitelistWaterfall extends Plugin { getLogger().info("Running on "+ ChatColor.DARK_AQUA+getProxy().getName()); loadConfig(); audiences = BungeeAudiences.create(this); + Metrics metrics = new Metrics(this, 8704); + this.getProxy().getPluginManager().registerListener(this, new BungeeChatEventListener()); try { Class.forName("io.github.waterfallmc.waterfall.event.ProxyDefineCommandsEvent"); + metrics.addCustomChart(new SimplePie("proxy", () -> "Waterfall")); this.getProxy().getPluginManager().registerListener(this, new WaterfallDefineCommandsListener()); } catch (ClassNotFoundException e) { - getLogger().severe(ChatColor.DARK_RED+"Bungee command completion blocker requires Waterfall other Waterfall fork."); + metrics.addCustomChart(new SimplePie("proxy", () -> "Bungee")); + getLogger().severe("Bungee command completion blocker requires Waterfall other Waterfall fork."); } this.getProxy().getPluginManager().registerListener(this, new BungeeTabcompleteListener()); getProxy().getPluginManager().registerCommand(this, new BungeeMainCommand("bcw")); - Metrics metrics = new Metrics(this, 8704); - metrics.addCustomChart(new SimplePie("proxy", () -> "Bungee/Waterfall")); + } public static CommandWhitelistWaterfall getPlugin() {