From 7fb4a477dc801059de75a277d9e291f5572f6579 Mon Sep 17 00:00:00 2001 From: Video Date: Wed, 12 Oct 2022 14:36:49 -0600 Subject: [PATCH] Removes TFGuilds integration (#264) TFGuilds was shitcanned the other day (good riddence), so there's no point in bridging it anymore. Co-authored-by: Allink <44676012+allinkdev@users.noreply.github.com> Co-authored-by: Ryan --- pom.xml | 7 --- .../totalfreedommod/ChatManager.java | 2 +- .../totalfreedommod/TotalFreedomMod.java | 3 - .../bridge/TFGuildsBridge.java | 58 ------------------- 4 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 src/main/java/me/totalfreedom/totalfreedommod/bridge/TFGuildsBridge.java diff --git a/pom.xml b/pom.xml index cd579a65..18babb6e 100644 --- a/pom.xml +++ b/pom.xml @@ -210,13 +210,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