fix mute message when chatting

deny /mail if muted
This commit is contained in:
Necrodoom 2013-07-12 16:17:30 +03:00 committed by KHobbits
parent 406c9e807e
commit ab359f678a
2 changed files with 6 additions and 1 deletions

View File

@ -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();

View File

@ -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)