diff options
author | Necrodoom <doomed.war@gmail.com> | 2013-07-12 16:17:30 +0300 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-07-12 15:22:48 +0100 |
commit | 60682e1ab57ce08d9a1bb1ba28dbcc431fafdf05 (patch) | |
tree | cfbb270147ed33e066492230d36ff83759e051a9 | |
parent | f88ace0318f48765a38da60fe41dda9663aa36a8 (diff) | |
download | Essentials-60682e1ab57ce08d9a1bb1ba28dbcc431fafdf05.tar Essentials-60682e1ab57ce08d9a1bb1ba28dbcc431fafdf05.tar.gz Essentials-60682e1ab57ce08d9a1bb1ba28dbcc431fafdf05.tar.lz Essentials-60682e1ab57ce08d9a1bb1ba28dbcc431fafdf05.tar.xz Essentials-60682e1ab57ce08d9a1bb1ba28dbcc431fafdf05.zip |
fix mute message when chatting
deny /mail if muted
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandmail.java | 5 |
2 files changed, 6 insertions, 1 deletions
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<Player> 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) |