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 <Wild1145@users.noreply.github.com>
This commit is contained in:
Video 2022-10-12 14:36:49 -06:00 committed by GitHub
parent 612499ff0a
commit 7fb4a477dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 69 deletions

View File

@ -210,13 +210,6 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.totalfreedom</groupId>
<artifactId>tfguilds</artifactId>
<version>2021.06-RC2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>

View File

@ -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));
}

View File

@ -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();
}

View File

@ -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);
}
}