mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 10:04:51 +02:00
fix mute message when chatting
deny /mail if muted
This commit is contained in:
@@ -65,7 +65,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
if (user.isMuted())
|
if (user.isMuted())
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
user.sendMessage(_("playerMuted"));
|
user.sendMessage(_("voiceSilenced"));
|
||||||
LOGGER.info(_("mutedUserSpeaks", user.getName()));
|
LOGGER.info(_("mutedUserSpeaks", user.getName()));
|
||||||
}
|
}
|
||||||
final Iterator<Player> it = event.getRecipients().iterator();
|
final Iterator<Player> it = event.getRecipients().iterator();
|
||||||
|
@@ -44,6 +44,11 @@ public class Commandmail extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
throw new Exception(_("noPerm", "essentials.mail.send"));
|
throw new Exception(_("noPerm", "essentials.mail.send"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user.isMuted())
|
||||||
|
{
|
||||||
|
throw new Exception(_("voiceSilenced"));
|
||||||
|
}
|
||||||
|
|
||||||
User u = ess.getUser(args[1]);
|
User u = ess.getUser(args[1]);
|
||||||
if (u == null)
|
if (u == null)
|
||||||
|
Reference in New Issue
Block a user