1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-13 01:54:25 +02:00

Prevent muted players from using /msg

This commit is contained in:
snowleo
2011-08-08 15:34:10 +02:00
parent d07ecde47d
commit a90b16be36

View File

@@ -25,6 +25,16 @@ public class Commandmsg extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
if (sender instanceof Player)
{
User user = ess.getUser(sender);
if (user.isMuted())
{
user.sendMessage(Util.i18n("voiceSilenced"));
return;
}
}
String message = getFinalArg(args, 1);
String translatedMe = Util.i18n("me");
@@ -48,7 +58,7 @@ public class Commandmsg extends EssentialsCommand
sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
int i = 0;
for (Player p : matches)
{