mirror of
https://github.com/TotalFreedomMC/TFGuilds.git
synced 2024-12-22 16:05:00 +00:00
Fix moderator chat
This commit is contained in:
parent
32afc7c1b2
commit
4ec00d977c
3 changed files with 15 additions and 2 deletions
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<groupId>me.totalfreedom</groupId>
|
<groupId>me.totalfreedom</groupId>
|
||||||
<artifactId>TFGuilds</artifactId>
|
<artifactId>TFGuilds</artifactId>
|
||||||
<version>2021.06-RC2</version>
|
<version>2021.06-RC3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>TFGuilds</name>
|
<name>TFGuilds</name>
|
||||||
|
|
|
@ -25,6 +25,12 @@ public class ModChatSubCommand extends Common implements SubCommand
|
||||||
return;
|
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)
|
if (args.length == 1)
|
||||||
{
|
{
|
||||||
sender.sendMessage(USAGE + "/g mchat <message>");
|
sender.sendMessage(USAGE + "/g mchat <message>");
|
||||||
|
|
|
@ -820,7 +820,14 @@ public class Guild
|
||||||
{
|
{
|
||||||
if (User.getUserFromPlayer(p).displayChat() && isMember(p))
|
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))
|
if (Common.GUILD_CHAT_SPY.contains(p) && player != p && !isMember(p))
|
||||||
|
|
Loading…
Reference in a new issue