Broadcast mute notify with mute duration if present.

This commit adds a new locale message code muteNotifyFor, which takes three parameters: muter, muted, duration.
This commit is contained in:
Ali Moghnieh 2016-06-18 14:00:51 +01:00
parent c75594f314
commit 203e8b0a75
2 changed files with 7 additions and 1 deletions

View File

@ -64,7 +64,12 @@ public class Commandmute extends EssentialsCommand {
sender.sendMessage(tl("mutedPlayer", user.getDisplayName()));
user.sendMessage(tl("playerMuted"));
}
final String message = tl("muteNotify", sender.getSender().getName(), user.getName(), muteTime);
final String message;
if (muteTimestamp > 0) {
message = tl("muteNotifyFor", sender.getSender().getName(), user.getName(), muteTime);
} else {
message = tl("muteNotify", sender.getSender().getName(), user.getName());
}
server.getLogger().log(Level.INFO, message);
ess.broadcastMessage("essentials.mute.notify", message);
} else {

View File

@ -253,6 +253,7 @@ multipleCharges=\u00a74You cannot apply more than one charge to this firework.
multiplePotionEffects=\u00a74You cannot apply more than one effect to this potion.
muteExempt=\u00a74You may not mute that player.
muteNotify=\u00a7c{0} \u00a76has muted player \u00a7c{1}\u00a76.
muteNotifyFor=\u00a7c{0} \u00a76has muted player \u00a7c{1}\u00a76 for\u00a7c {2}\u00a76.
mutedPlayer=\u00a76Player\u00a7c {0} \u00a76muted.
mutedPlayerFor=\u00a76Player\u00a7c {0} \u00a76muted for\u00a7c {1}\u00a76.
mutedUserSpeaks={0} tried to speak, but is muted.