mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 04:58:00 +02:00
essentials.mute.exempt prevents muting, send messages when a player is muted to the muted
This commit is contained in:
parent
b749cd4e42
commit
31326d530f
@ -60,6 +60,7 @@ public class EssentialsPlayerListener extends PlayerListener
|
||||
if (user.isMuted())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
user.sendMessage(Util.i18n("playeMuted"));
|
||||
LOGGER.info(Util.format("mutedUserSpeaks", user.getName()));
|
||||
}
|
||||
final Iterator<Player> it = event.getRecipients().iterator();
|
||||
|
@ -21,7 +21,12 @@ public class Commandmute extends EssentialsCommand
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
User p = getPlayer(server, args, 0);
|
||||
User p = getPlayer(server, args, 0, true);
|
||||
if (p.isAuthorized("essentials.mute.exempt"))
|
||||
{
|
||||
sender.sendMessage(commandLabel);
|
||||
return;
|
||||
}
|
||||
long muteTimestamp = 0;
|
||||
if (args.length > 1)
|
||||
{
|
||||
@ -30,13 +35,19 @@ public class Commandmute extends EssentialsCommand
|
||||
}
|
||||
p.setMuteTimeout(muteTimestamp);
|
||||
charge(sender);
|
||||
|
||||
|
||||
boolean muted = p.toggleMuted();
|
||||
sender.sendMessage(
|
||||
p.toggleMuted()
|
||||
muted
|
||||
? (muteTimestamp > 0
|
||||
? Util.format("mutedPlayerFor", p.getDisplayName(), Util.formatDateDiff(muteTimestamp))
|
||||
: Util.format("mutedPlayer", p.getDisplayName()))
|
||||
: Util.format("unmutedPlayer", p.getDisplayName()));
|
||||
p.sendMessage(
|
||||
muted
|
||||
? (muteTimestamp > 0
|
||||
? Util.format("playerMutedFor", Util.formatDateDiff(muteTimestamp))
|
||||
: Util.i18n("playerMuted"))
|
||||
: Util.i18n("playerUnmuted"));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -182,6 +182,7 @@ nickSet = \u00a77Your nickname is now \u00a7c{0}
|
||||
noAccessCommand = \u00a7cYou do not have access to that command.
|
||||
noAccessPermission = \u00a7cYou do not have permission to access that {0}.
|
||||
noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
|
||||
noHelpFound = \u00a7cNo matching commands.
|
||||
noHomeSet = You have not set a home.
|
||||
noHomeSetPlayer = Player has not set a home.
|
||||
noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
|
||||
@ -213,8 +214,11 @@ playerInJail = \u00a7cPlayer is already in jail {0}.
|
||||
playerJailed = \u00a77Player {0} jailed.
|
||||
playerJailedFor = \u00a77Player {0} jailed for {1}.
|
||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||
playerMuted = "$7You have been muted"
|
||||
playerMutedFor = "$7You have been muted for {0}"
|
||||
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
|
||||
playerNotFound = \u00a7cPlayer not found.
|
||||
playerUnmuted = "$7You have been unmuted"
|
||||
pong = Pong!
|
||||
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
|
||||
powerToolAir = Command can''t be attached to air.
|
||||
|
@ -184,6 +184,7 @@ nickSet = \u00a77Dit kaldenavn er nu \u00a7c{0}
|
||||
noAccessCommand = \u00a7cDu har ikke adgang til den kommando.
|
||||
noAccessPermission = \u00a7cDu har ikke tilladelse til at f\u00e5 adgang til det {0}.
|
||||
noDestroyPermission = \u00a7cDu har ikke tilladelse til at \u00f8del\u00e6gge det {0}.
|
||||
noHelpFound = \u00a7cNo matching commands.
|
||||
noHomeSet = Du har sat et nyt hjem.
|
||||
noHomeSetPlayer = Spiller har ikke sat et hjem.
|
||||
noKitPermission = \u00a7cDu har brug for \u00a7c{0}\u00a7c tilladelsen for at bruge den pakke.
|
||||
@ -215,8 +216,11 @@ playerInJail = \u00a7cSpiller er allerede i f\u00e6ngsel {0}.
|
||||
playerJailed = \u00a77Spiller {0} f\u00e6ngslet.
|
||||
playerJailedFor = \u00a77Spiller {0} f\u00e6ngslet for {1}.
|
||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||
playerMuted = "$7You have been muted"
|
||||
playerMutedFor = "$7You have been muted for {0}"
|
||||
playerNeverOnServer = \u00a7cSpiller {0} var aldrig p\u00e5 denne server.
|
||||
playerNotFound = \u00a7cSpiller ikke fundet.
|
||||
playerUnmuted = "$7You have been unmuted"
|
||||
pong = Pong!
|
||||
possibleWorlds = \u00a77Mulige verdener er numrene 0 igennem {0}.
|
||||
powerToolAir = Kommando kan ikke blive tildelt luft.
|
||||
|
@ -182,6 +182,7 @@ nickSet = \u00a77Dein Nickname ist nun \u00a7c{0}
|
||||
noAccessCommand = \u00a7cDu hast keinen Zugriff auf diesen Befehl.
|
||||
noAccessPermission = \u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen.
|
||||
noDestroyPermission = \u00a7cDu hast keine Rechte, den Block {0} zu zerst\u00f6ren.
|
||||
noHelpFound = \u00a7cNo matching commands.
|
||||
noHomeSet = Du hast kein Zuhause gesetzt.
|
||||
noHomeSetPlayer = Spieler hat kein Zuhause gesetzt.
|
||||
noKitPermission = \u00a7cDu brauchst die Berechtigung \u00a7c{0}\u00a7c um diese Ausr\u00fcstung anzufordern.
|
||||
@ -213,8 +214,11 @@ playerInJail = \u00a7cSpieler ist bereits in Gef\u00e4ngnis {0}.
|
||||
playerJailed = \u00a77Spieler {0} eingesperrt.
|
||||
playerJailedFor = \u00a77Spieler {0} eingesperrt f\u00fcr {1}.
|
||||
playerKicked = \u00a7cSpieler {0} rausgeworfen: {1}
|
||||
playerMuted = "$7You have been muted"
|
||||
playerMutedFor = "$7You have been muted for {0}"
|
||||
playerNeverOnServer = \u00a7cSpieler {0} war niemals auf diesem Server.
|
||||
playerNotFound = \u00a7cSpieler nicht gefunden.
|
||||
playerUnmuted = "$7You have been unmuted"
|
||||
pong = Pong!
|
||||
possibleWorlds = \u00a77M\u00f6gliche Welten sind nummeriet von 0 bis {0}.
|
||||
powerToolAir = Befehl kann nicht mit Luft verbunden werden.
|
||||
|
@ -214,8 +214,11 @@ playerInJail = \u00a7cPlayer is already in jail {0}.
|
||||
playerJailed = \u00a77Player {0} jailed.
|
||||
playerJailedFor = \u00a77Player {0} jailed for {1}.
|
||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||
playerMuted = "$7You have been muted"
|
||||
playerMutedFor = "$7You have been muted for {0}"
|
||||
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
|
||||
playerNotFound = \u00a7cPlayer not found.
|
||||
playerUnmuted = "$7You have been unmuted"
|
||||
pong = Pong!
|
||||
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
|
||||
powerToolAir = Command can''t be attached to air.
|
||||
|
@ -182,6 +182,7 @@ nickSet = \u00a77Votre pseudo est maintenant \u00a7c{0}
|
||||
noAccessCommand = \u00a7cVous n''avez pas acc\u00e8s \u00e0 cette commande.
|
||||
noAccessPermission = \u00a7cVous n''avez pas la permissions d''acc\u00e9der \u00e0 cette {0}
|
||||
noDestroyPermission = \u00a7cVous n''avez pas la permission de d\u00e9truire ce {0}.
|
||||
noHelpFound = \u00a7cNo matching commands.
|
||||
noHomeSet = Vous n''avez pas d\u00e9fini de home.
|
||||
noHomeSetPlayer = Le joueur n''a pas d\u00e9fini son home.
|
||||
noKitPermission = \u00a7cVous avez besoin de la permission \u00a7c{0}\u00a7c pour utiliser ce kit.
|
||||
@ -213,8 +214,11 @@ playerInJail = \u00a7cLe joueur est d\u00e9j\u00e0 dans la prison {0}.
|
||||
playerJailed = \u00a77Le joueur {0} a \u00e9t\u00e9 emprisonn\u00e9.
|
||||
playerJailedFor = \u00a77{0} a \u00e9t\u00e9 emprisonn\u00e9 pour {1}.
|
||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||
playerMuted = "$7You have been muted"
|
||||
playerMutedFor = "$7You have been muted for {0}"
|
||||
playerNeverOnServer = \u00a7cLe joueur {0} n''a jamais \u00e9t\u00e9 sur le serveur.
|
||||
playerNotFound = \u00a7cLe joueur est introuvable.
|
||||
playerUnmuted = "$7You have been unmuted"
|
||||
pong = Pong!
|
||||
possibleWorlds = \u00a77Les mondes possibles sont les nombres 0 par {0}.
|
||||
powerToolAir = La commande ne peut pas \u00eatre attach\u00e9e \u00e0 l''air.
|
||||
|
@ -183,6 +183,7 @@ nickSet = \u00a77Je nickname is nu \u00a7c{0}
|
||||
noAccessCommand = \u00a7cJe hebt geen toegang tot die opdracht.
|
||||
noAccessPermission = \u00a7cJe hebt hier geen toegang voor {0}.
|
||||
noDestroyPermission = \u00a7cJe hebt geen toegang om dat te vernietigen {0}.
|
||||
noHelpFound = \u00a7cNo matching commands.
|
||||
noHomeSet = Je hebt geen home gemaakt.
|
||||
noHomeSetPlayer = Speler heeft geen home.
|
||||
noKitPermission = \u00a7cJe hebt de \u00a7c{0}\u00a7c toestemming nodig om die kit te gebruiken.
|
||||
@ -214,8 +215,11 @@ playerInJail = \u00a7cSpeler zit al in de gevangenis {0}.
|
||||
playerJailed = \u00a77Speler {0} is in de gevangenis gezet.
|
||||
playerJailedFor = \u00a77Speler {0} is in de gevangenis gezet voor {1}.
|
||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||
playerMuted = "$7You have been muted"
|
||||
playerMutedFor = "$7You have been muted for {0}"
|
||||
playerNeverOnServer = \u00a7cSpeler {0} is nooit op deze server geweest.
|
||||
playerNotFound = \u00a7cSpeler niet gevonden.
|
||||
playerUnmuted = "$7You have been unmuted"
|
||||
pong = Pong!
|
||||
possibleWorlds = \u00a77Mogelijk zijn de werelden de nummer 0 tot en met {0}.
|
||||
powerToolAir = Command kan niet worden bevestigd aan de lucht.
|
||||
|
Loading…
Reference in New Issue
Block a user