From ab359f678a432bafd6a5f6048c4880b225c49c0e Mon Sep 17 00:00:00 2001 From: Necrodoom Date: Fri, 12 Jul 2013 16:17:30 +0300 Subject: [PATCH] fix mute message when chatting deny /mail if muted --- .../com/earth2me/essentials/EssentialsPlayerListener.java | 2 +- .../src/com/earth2me/essentials/commands/Commandmail.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index b41212ae4..75bdbde34 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -65,7 +65,7 @@ public class EssentialsPlayerListener implements Listener if (user.isMuted()) { event.setCancelled(true); - user.sendMessage(_("playerMuted")); + user.sendMessage(_("voiceSilenced")); LOGGER.info(_("mutedUserSpeaks", user.getName())); } final Iterator it = event.getRecipients().iterator(); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java index ebf3730f4..d72d37a3c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java @@ -44,6 +44,11 @@ public class Commandmail extends EssentialsCommand { throw new Exception(_("noPerm", "essentials.mail.send")); } + + if (user.isMuted()) + { + throw new Exception(_("voiceSilenced")); + } User u = ess.getUser(args[1]); if (u == null)