diff --git a/pom.xml b/pom.xml
index 648c21c..95761d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
me.totalfreedom
TFGuilds
- 2021.06-RC2
+ 2021.06-RC3
jar
TFGuilds
diff --git a/src/main/java/me/totalfreedom/tfguilds/command/ModChatSubCommand.java b/src/main/java/me/totalfreedom/tfguilds/command/ModChatSubCommand.java
index 5b052df..3423480 100644
--- a/src/main/java/me/totalfreedom/tfguilds/command/ModChatSubCommand.java
+++ b/src/main/java/me/totalfreedom/tfguilds/command/ModChatSubCommand.java
@@ -25,6 +25,12 @@ public class ModChatSubCommand extends Common implements SubCommand
return;
}
+ if (!guild.isModerator(playerSender))
+ {
+ sender.sendMessage(PREFIX + "You must be a guild moderator to set player's rank for your guild.");
+ return;
+ }
+
if (args.length == 1)
{
sender.sendMessage(USAGE + "/g mchat ");
diff --git a/src/main/java/me/totalfreedom/tfguilds/guild/Guild.java b/src/main/java/me/totalfreedom/tfguilds/guild/Guild.java
index aeeab98..f4c5d7c 100644
--- a/src/main/java/me/totalfreedom/tfguilds/guild/Guild.java
+++ b/src/main/java/me/totalfreedom/tfguilds/guild/Guild.java
@@ -820,7 +820,14 @@ public class Guild
{
if (User.getUserFromPlayer(p).displayChat() && isMember(p))
{
- p.sendMessage(GUtil.colorize("&7[&bGuild " + (modChat ? "Mod " : "") + "Chat &7| &b" + name + "&7] " + player.getName() + " &8\u00BB &6") + message);
+ if (modChat && isModerator(p))
+ {
+ p.sendMessage(GUtil.colorize("&7[&bGuild Mod Chat &7| &b" + name + "&7] " + player.getName() + " &8\u00BB &6") + message);
+ }
+ else
+ {
+ p.sendMessage(GUtil.colorize("&7[&bGuild Chat &7| &b" + name + "&7] " + player.getName() + " &8\u00BB &6") + message);
+ }
}
if (Common.GUILD_CHAT_SPY.contains(p) && player != p && !isMember(p))