diff --git a/pom.xml b/pom.xml
index a4fdeb3a..d099db34 100644
--- a/pom.xml
+++ b/pom.xml
@@ -237,6 +237,12 @@
1.18.10
+
+ com.github.speedxx
+ TFGuilds
+ master-SNAPSHOT
+
+
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java b/src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java
index 82aee7e6..e9286ce8 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/ChatManager.java
@@ -79,7 +79,6 @@ public class ChatManager extends FreedomService
FSync.playerMsg(player, "Message was shortened because it was too long to send.");
}
-
final FPlayer fPlayer = plugin.pl.getPlayerSync(player);
if (fPlayer.isLockedUp())
{
@@ -137,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())
+ if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean() && !Bukkit.hasWhitelist() && !plugin.pl.getPlayer(player).isMuted() && !plugin.tfg.inGuildChat(player))
{
plugin.dc.messageChatChannel(plugin.dc.deformat(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 65ab1ac3..2e51f398 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java
@@ -21,6 +21,7 @@ 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;
@@ -134,6 +135,7 @@ public class TotalFreedomMod extends JavaPlugin
public SignBlocker snp;
public EntityWiper ew;
public Sitter st;
+
//public HubWorldRestrictions hwr;
//
// Bridges
@@ -141,6 +143,7 @@ public class TotalFreedomMod extends JavaPlugin
public EssentialsBridge esb;
public LibsDisguisesBridge ldb;
public CoreProtectBridge cpb;
+ public TFGuildsBridge tfg;
public WorldEditBridge web;
public WorldGuardBridge wgb;
@@ -254,7 +257,6 @@ public class TotalFreedomMod extends JavaPlugin
ae = new AutoEject();
mo = new Monitors();
-
mv = new MovementValidator();
sp = new ServerPing();
@@ -273,6 +275,7 @@ public class TotalFreedomMod extends JavaPlugin
cpb = new CoreProtectBridge();
esb = new EssentialsBridge();
ldb = new LibsDisguisesBridge();
+ tfg = new TFGuildsBridge();
web = new WorldEditBridge();
wgb = new WorldGuardBridge();
@@ -376,4 +379,4 @@ public class TotalFreedomMod extends JavaPlugin
{
return new CleanroomChunkGenerator(id);
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/bridge/TFGuildsBridge.java b/src/main/java/me/totalfreedom/totalfreedommod/bridge/TFGuildsBridge.java
new file mode 100644
index 00000000..f1cd15c3
--- /dev/null
+++ b/src/main/java/me/totalfreedom/totalfreedommod/bridge/TFGuildsBridge.java
@@ -0,0 +1,52 @@
+package me.totalfreedom.totalfreedommod.bridge;
+
+import me.totalfreedom.tfguilds.Common;
+import me.totalfreedom.tfguilds.TFGuilds;
+import me.totalfreedom.totalfreedommod.FreedomService;
+import me.totalfreedom.totalfreedommod.util.FLog;
+import org.bukkit.entity.Player;
+import org.bukkit.plugin.Plugin;
+
+public class TFGuildsBridge extends FreedomService
+{
+
+ private TFGuilds tfGuildsPlugin = null;
+
+ @Override
+ public void onStart()
+ {
+ }
+
+ @Override
+ public void onStop()
+ {
+ }
+
+ public TFGuilds getTfGuildsPlugin()
+ {
+ if (tfGuildsPlugin == null)
+ {
+ try
+ {
+ final Plugin tfGuilds = server.getPluginManager().getPlugin("TFGuilds");
+ if (tfGuilds != null)
+ {
+ if (tfGuilds instanceof TFGuilds)
+ {
+ tfGuildsPlugin = (TFGuilds)tfGuilds;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ FLog.severe(ex);
+ }
+ }
+ return tfGuildsPlugin;
+ }
+
+ public boolean inGuildChat(Player player)
+ {
+ return Common.IN_GUILD_CHAT.contains(player);
+ }
+}
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 6dde1542..3e6f5636 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -2,6 +2,6 @@ name: TotalFreedomMod
main: me.totalfreedom.totalfreedommod.TotalFreedomMod
version: ${project.version}
description: Plugin for the Total Freedom server.
-softdepend: [BukkitTelnet, Essentials, LibsDisguises, WorldEdit]
+softdepend: [BukkitTelnet, Essentials, LibsDisguises, WorldEdit, TFGuilds]
authors: [Madgeek1450, Prozza]
-api-version: 1.15
+api-version: 1.15
\ No newline at end of file