bstats shenanigans for proxy name

This commit is contained in:
2021-09-13 22:49:49 +02:00
parent 26a408812d
commit c586a8af05
@@ -32,18 +32,21 @@ public final class CommandWhitelistWaterfall extends Plugin {
getLogger().info("Running on "+ ChatColor.DARK_AQUA+getProxy().getName()); getLogger().info("Running on "+ ChatColor.DARK_AQUA+getProxy().getName());
loadConfig(); loadConfig();
audiences = BungeeAudiences.create(this); audiences = BungeeAudiences.create(this);
Metrics metrics = new Metrics(this, 8704);
this.getProxy().getPluginManager().registerListener(this, new BungeeChatEventListener()); this.getProxy().getPluginManager().registerListener(this, new BungeeChatEventListener());
try { try {
Class.forName("io.github.waterfallmc.waterfall.event.ProxyDefineCommandsEvent"); Class.forName("io.github.waterfallmc.waterfall.event.ProxyDefineCommandsEvent");
metrics.addCustomChart(new SimplePie("proxy", () -> "Waterfall"));
this.getProxy().getPluginManager().registerListener(this, new WaterfallDefineCommandsListener()); this.getProxy().getPluginManager().registerListener(this, new WaterfallDefineCommandsListener());
} catch (ClassNotFoundException e) { } 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()); this.getProxy().getPluginManager().registerListener(this, new BungeeTabcompleteListener());
getProxy().getPluginManager().registerCommand(this, new BungeeMainCommand("bcw")); getProxy().getPluginManager().registerCommand(this, new BungeeMainCommand("bcw"));
Metrics metrics = new Metrics(this, 8704);
metrics.addCustomChart(new SimplePie("proxy", () -> "Bungee/Waterfall"));
} }
public static CommandWhitelistWaterfall getPlugin() { public static CommandWhitelistWaterfall getPlugin() {