diff --git a/pom.xml b/pom.xml index 98eabb15..14955c81 100644 --- a/pom.xml +++ b/pom.xml @@ -211,13 +211,6 @@ compile - - me.totalfreedom - tfguilds - 2021.06-RC2 - provided - - org.jetbrains annotations diff --git a/src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java b/src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java index 2156af99..fd8c3d8d 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java @@ -136,7 +136,7 @@ public class ChatManager extends FreedomService event.setFormat(format); // Send to discord - if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean() && !Bukkit.hasWhitelist() && !plugin.pl.getPlayer(player).isMuted() && !plugin.tfg.inGuildChat(player)) + if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean() && !Bukkit.hasWhitelist() && !plugin.pl.getPlayer(player).isMuted()) { plugin.dc.messageChatChannel(player.getName() + " \u00BB " + ChatColor.stripColor(message)); } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java b/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java index 31dff85b..bcab4b04 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java @@ -19,7 +19,6 @@ import me.totalfreedom.totalfreedommod.bridge.BukkitTelnetBridge; import me.totalfreedom.totalfreedommod.bridge.CoreProtectBridge; import me.totalfreedom.totalfreedommod.bridge.EssentialsBridge; import me.totalfreedom.totalfreedommod.bridge.LibsDisguisesBridge; -import me.totalfreedom.totalfreedommod.bridge.TFGuildsBridge; import me.totalfreedom.totalfreedommod.bridge.WorldEditBridge; import me.totalfreedom.totalfreedommod.bridge.WorldGuardBridge; import me.totalfreedom.totalfreedommod.caging.Cager; @@ -128,7 +127,6 @@ public class TotalFreedomMod extends JavaPlugin public EssentialsBridge esb; public LibsDisguisesBridge ldb; public CoreProtectBridge cpb; - public TFGuildsBridge tfg; public WorldEditBridge web; public WorldGuardBridge wgb; @@ -342,7 +340,6 @@ public class TotalFreedomMod extends JavaPlugin cpb = new CoreProtectBridge(); esb = new EssentialsBridge(); ldb = new LibsDisguisesBridge(); - tfg = new TFGuildsBridge(); web = new WorldEditBridge(); wgb = new WorldGuardBridge(); } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/bridge/TFGuildsBridge.java b/src/main/java/me/totalfreedom/totalfreedommod/bridge/TFGuildsBridge.java deleted file mode 100644 index e315b15c..00000000 --- a/src/main/java/me/totalfreedom/totalfreedommod/bridge/TFGuildsBridge.java +++ /dev/null @@ -1,58 +0,0 @@ -package me.totalfreedom.totalfreedommod.bridge; - -import me.totalfreedom.tfguilds.Common; -import me.totalfreedom.tfguilds.TFGuilds; -import me.totalfreedom.totalfreedommod.FreedomService; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - -public class TFGuildsBridge extends FreedomService -{ - public boolean enabled = false; - - @Override - public void onStart() - { - } - - @Override - public void onStop() - { - } - - public boolean isTFGuildsEnabled() - { - if (enabled) - { - return true; - } - - try - { - final Plugin tfGuilds = server.getPluginManager().getPlugin("TFGuilds"); - if (tfGuilds != null && tfGuilds.isEnabled()) - { - if (tfGuilds instanceof TFGuilds) - { - enabled = true; - return true; - } - } - } - catch (NoClassDefFoundError ex) - { - return false; - } - - return false; - } - - public boolean inGuildChat(Player player) - { - if (!isTFGuildsEnabled()) - { - return false; - } - return Common.GUILD_CHAT.contains(player); - } -} \ No newline at end of file