mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-12 14:36:56 +00:00
improved waterfall check
This commit is contained in:
@@ -29,11 +29,13 @@ public final class CommandWhitelistBungee extends Plugin {
|
|||||||
getLogger().info("Running on "+ ChatColor.DARK_AQUA+getProxy().getName());
|
getLogger().info("Running on "+ ChatColor.DARK_AQUA+getProxy().getName());
|
||||||
loadConfig();
|
loadConfig();
|
||||||
this.getProxy().getPluginManager().registerListener(this, new BungeeChatEventListener());
|
this.getProxy().getPluginManager().registerListener(this, new BungeeChatEventListener());
|
||||||
if (this.getProxy().getName().contains("Waterfall") || getProxy().getName().contains("FlameCord")) {
|
try {
|
||||||
|
Class.forName("io.github.waterfallmc.waterfall.conf.WaterfallConfiguration");
|
||||||
this.getProxy().getPluginManager().registerListener(this, new BungeeTabCompleteListener());
|
this.getProxy().getPluginManager().registerListener(this, new BungeeTabCompleteListener());
|
||||||
} else {
|
} catch (ClassNotFoundException e) {
|
||||||
getLogger().info("Bungee tab completion requires Waterfall, FlameCord or other Waterfall fork.");
|
getLogger().severe(ChatColor.DARK_RED+"Bungee tab completion blocker requires Waterfall other Waterfall fork.");
|
||||||
}
|
}
|
||||||
|
|
||||||
getProxy().getPluginManager().registerCommand(this, new BungeeMainCommand());
|
getProxy().getPluginManager().registerCommand(this, new BungeeMainCommand());
|
||||||
|
|
||||||
int pluginId = 8704;
|
int pluginId = 8704;
|
||||||
@@ -77,7 +79,6 @@ public final class CommandWhitelistBungee extends Plugin {
|
|||||||
getProxy().getScheduler().runAsync(this, () -> {
|
getProxy().getScheduler().runAsync(this, () -> {
|
||||||
loadConfig();
|
loadConfig();
|
||||||
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', CommandWhitelistBungee.getConfigCache().getPrefix() + CommandWhitelistBungee.getConfigCache().getConfigReloaded()));
|
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', CommandWhitelistBungee.getConfigCache().getPrefix() + CommandWhitelistBungee.getConfigCache().getConfigReloaded()));
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user