[FEATURE] Add kill exempt :: new permission: essentials.kill.exempt

players with essentials.kill.force and console will still be able to override this
This commit is contained in:
Iaccidentally 2013-04-19 14:40:10 -04:00
parent 62942bdb3d
commit 547e262061
15 changed files with 19 additions and 1 deletions

View File

@ -32,12 +32,16 @@ public class Commandkill extends EssentialsCommand
final List<Player> matchedPlayers = server.matchPlayer(args[0]); final List<Player> matchedPlayers = server.matchPlayer(args[0]);
for (Player matchPlayer : matchedPlayers) for (Player matchPlayer : matchedPlayers)
{ {
if (ess.getUser(matchPlayer).isAuthorized("essentials.kill.exempt") && !ess.getUser(sender).isAuthorized("essentials.kill.force"))
{
throw new Exception(_("killExempt", matchPlayer.getDisplayName()));
}
final EntityDamageEvent ede = new EntityDamageEvent(matchPlayer, sender instanceof Player && ((Player)sender).getName().equals(matchPlayer.getName()) ? EntityDamageEvent.DamageCause.SUICIDE : EntityDamageEvent.DamageCause.CUSTOM, Short.MAX_VALUE); final EntityDamageEvent ede = new EntityDamageEvent(matchPlayer, sender instanceof Player && ((Player)sender).getName().equals(matchPlayer.getName()) ? EntityDamageEvent.DamageCause.SUICIDE : EntityDamageEvent.DamageCause.CUSTOM, Short.MAX_VALUE);
server.getPluginManager().callEvent(ede); server.getPluginManager().callEvent(ede);
if (ede.isCancelled() && sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.kill.force")) if (ede.isCancelled() && sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.kill.force"))
{ {
continue; continue;
} }
matchPlayer.damage(Short.MAX_VALUE); matchPlayer.damage(Short.MAX_VALUE);
if (matchPlayer.getHealth() > 0) if (matchPlayer.getHealth() > 0)

View File

@ -212,6 +212,7 @@ kickDefault=Kicked from server.
kickExempt=\u00a74You can not kick that person. kickExempt=\u00a74You can not kick that person.
kickedAll=\u00a74Kicked all players from server. kickedAll=\u00a74Kicked all players from server.
kill=\u00a76Killed\u00a7c {0}\u00a76. kill=\u00a76Killed\u00a7c {0}\u00a76.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a74That kit does not exist or is improperly defined. kitError2=\u00a74That kit does not exist or is improperly defined.
kitError=\u00a74There are no valid kits. kitError=\u00a74There are no valid kits.
kitErrorHelp=\u00a74Perhaps an item is missing a quantity in the configuration? kitErrorHelp=\u00a74Perhaps an item is missing a quantity in the configuration?

View File

@ -215,6 +215,7 @@ kickDefault=Vyhozen ze serveru
kickExempt=\u00a7cNemuzes vyhodit tuhle osobu. kickExempt=\u00a7cNemuzes vyhodit tuhle osobu.
kickedAll=\u00a7cKicked all players from server kickedAll=\u00a7cKicked all players from server
kill=\u00a77Zabit {0}. kill=\u00a77Zabit {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cTento kit neexistuje, nebo je chybne definovan. kitError2=\u00a7cTento kit neexistuje, nebo je chybne definovan.
kitError=\u00a7cNejsou zadne validni kity. kitError=\u00a7cNejsou zadne validni kity.
kitErrorHelp=\u00a7cPravdepodobne item nema vyplnene mnozstvi v configu? kitErrorHelp=\u00a7cPravdepodobne item nema vyplnene mnozstvi v configu?

View File

@ -212,6 +212,7 @@ kickDefault=Kicked fra serveren.
kickExempt=\u00a77Du kan ikke kicke denne spiller. kickExempt=\u00a77Du kan ikke kicke denne spiller.
kickedAll=\u00a7cKicked all players from server kickedAll=\u00a7cKicked all players from server
kill=\u00a77dr\u00e6bte {0}. kill=\u00a77dr\u00e6bte {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cDette kit eksisterer ikke eller er forkert defineret. kitError2=\u00a7cDette kit eksisterer ikke eller er forkert defineret.
kitError=\u00a7cDer er ikke nogen gyldige kits. kitError=\u00a7cDer er ikke nogen gyldige kits.
kitErrorHelp=\u00a7cM\u00e5ske mangler en ting en m\u00e6ngde i konfigurationen? Eller m\u00c3\u00a5ske er der nisser p\u00c3\u00a5 spil? kitErrorHelp=\u00a7cM\u00e5ske mangler en ting en m\u00e6ngde i konfigurationen? Eller m\u00c3\u00a5ske er der nisser p\u00c3\u00a5 spil?

View File

@ -212,6 +212,7 @@ kickDefault=Vom Server geworfen
kickExempt=\u00a7cDu kannst diesen Spieler nicht rauswerfen. kickExempt=\u00a7cDu kannst diesen Spieler nicht rauswerfen.
kickedAll=\u00a7cKicked all players from server kickedAll=\u00a7cKicked all players from server
kill=\u00a77{0} get\u00f6tet. kill=\u00a77{0} get\u00f6tet.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig. kitError2=\u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig.
kitError=\u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen. kitError=\u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen.
kitErrorHelp=\u00a7cEventuell fehlt bei einem Gegenstand die Menge? kitErrorHelp=\u00a7cEventuell fehlt bei einem Gegenstand die Menge?

View File

@ -212,6 +212,7 @@ kickDefault=Kicked from server.
kickExempt=\u00a74You can not kick that person. kickExempt=\u00a74You can not kick that person.
kickedAll=\u00a74Kicked all players from server. kickedAll=\u00a74Kicked all players from server.
kill=\u00a76Killed\u00a7c {0}\u00a76. kill=\u00a76Killed\u00a7c {0}\u00a76.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a74That kit does not exist or is improperly defined. kitError2=\u00a74That kit does not exist or is improperly defined.
kitError=\u00a74There are no valid kits. kitError=\u00a74There are no valid kits.
kitErrorHelp=\u00a74Perhaps an item is missing a quantity in the configuration? kitErrorHelp=\u00a74Perhaps an item is missing a quantity in the configuration?

View File

@ -212,6 +212,7 @@ kickDefault=Echado del servidor.
kickExempt=\u00a7cNo puedes echar a esa persona. kickExempt=\u00a7cNo puedes echar a esa persona.
kickedAll=\u00a7cTodos los jugadores fueron kickeados. kickedAll=\u00a7cTodos los jugadores fueron kickeados.
kill=\u00a77ha matado a {0}. kill=\u00a77ha matado a {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cEse kit no existe o esta mal escrito. kitError2=\u00a7cEse kit no existe o esta mal escrito.
kitError=\u00a7cNo hay ningun kit valido. kitError=\u00a7cNo hay ningun kit valido.
kitErrorHelp=\u00a7cLe falta especificar la cantidad a un item en la configuracion? kitErrorHelp=\u00a7cLe falta especificar la cantidad a un item en la configuracion?

View File

@ -212,6 +212,7 @@ kickDefault=Potkittu palvelimelta
kickExempt=\u00a7cEt voi potkia h\u00e4nt\u00e4. kickExempt=\u00a7cEt voi potkia h\u00e4nt\u00e4.
kickedAll=\u00a7cPotkittu kaikki pelaajat palvelimelta kickedAll=\u00a7cPotkittu kaikki pelaajat palvelimelta
kill=\u00a77Tappoi {0}. kill=\u00a77Tappoi {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cTuota pakkausta ei ole olemassa tai se on v\u00e4\u00e4rin muokattu. kitError2=\u00a7cTuota pakkausta ei ole olemassa tai se on v\u00e4\u00e4rin muokattu.
kitError=\u00a7cEi ole sopivia pakkauksia. kitError=\u00a7cEi ole sopivia pakkauksia.
kitErrorHelp=\u00a7cEhk\u00e4 tavaralle ei ole m\u00e4\u00e4ritetty m\u00e4\u00e4r\u00e4\u00e4 configissa? kitErrorHelp=\u00a7cEhk\u00e4 tavaralle ei ole m\u00e4\u00e4ritetty m\u00e4\u00e4r\u00e4\u00e4 configissa?

View File

@ -212,6 +212,7 @@ kickDefault=\u00c9ject\u00e9 du serveur
kickExempt=\u00a77Vous ne pouvez pas \u00e9jecter ce joueur. kickExempt=\u00a77Vous ne pouvez pas \u00e9jecter ce joueur.
kickedAll=\u00a7cTous les joueurs ont \u00e9t\u00e9 \u00e9ject\u00e9s kickedAll=\u00a7cTous les joueurs ont \u00e9t\u00e9 \u00e9ject\u00e9s
kill=\u00a77Tu\u00e9 {0}. kill=\u00a77Tu\u00e9 {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cCe kit n'existe pas ou a \u00e9t\u00e9 mal d\u00e9fini. kitError2=\u00a7cCe kit n'existe pas ou a \u00e9t\u00e9 mal d\u00e9fini.
kitError=\u00a7cIl n'y a pas de kits valides. kitError=\u00a7cIl n'y a pas de kits valides.
kitErrorHelp=\u00a7cPeut-\u00eatre qu'un objet manque d'une quantit\u00e9 dans la configuration ? kitErrorHelp=\u00a7cPeut-\u00eatre qu'un objet manque d'une quantit\u00e9 dans la configuration ?

View File

@ -212,6 +212,7 @@ kickDefault=Kickato dal server
kickExempt=\u00a7cNon puoi kickare questo player. kickExempt=\u00a7cNon puoi kickare questo player.
kickedAll=\u00a7cKicked all players from server kickedAll=\u00a7cKicked all players from server
kill=\u00a77Ucciso {0}. kill=\u00a77Ucciso {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cQuesto kit non esiste o non e'' definito. kitError2=\u00a7cQuesto kit non esiste o non e'' definito.
kitError=\u00a7cNon ci sono kit validi. kitError=\u00a7cNon ci sono kit validi.
kitErrorHelp=\u00a7cForse una quantita'' manca in un oggetto della configurazione? kitErrorHelp=\u00a7cForse una quantita'' manca in un oggetto della configurazione?

View File

@ -212,6 +212,7 @@ kickDefault=Je bent van de server afgeschopt.
kickExempt=\u00a77Je kunt die speler niet van de server afschoppen. kickExempt=\u00a77Je kunt die speler niet van de server afschoppen.
kickedAll=\u00a7cAlle spelers van de server afgeschopt. kickedAll=\u00a7cAlle spelers van de server afgeschopt.
kill=\u00a77Jij doodde {0}. kill=\u00a77Jij doodde {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cDie kit bestaat niet of is verkeerde beschreven. kitError2=\u00a7cDie kit bestaat niet of is verkeerde beschreven.
kitError=\u00a7cEr zijn geen geldige kits. kitError=\u00a7cEr zijn geen geldige kits.
kitErrorHelp=\u00a7cMisschien mist er een hoeveelheid van het item in de configuratie? kitErrorHelp=\u00a7cMisschien mist er een hoeveelheid van het item in de configuratie?

View File

@ -212,6 +212,7 @@ kickDefault=Zostales wyrzucony z serwera.
kickExempt=\u00a74Nie mozesz wyrzucic tej osoby. kickExempt=\u00a74Nie mozesz wyrzucic tej osoby.
kickedAll=\u00a74Wyrzucanie wszystki graczy z serwera kickedAll=\u00a74Wyrzucanie wszystki graczy z serwera
kill=\u00a7c{0} \u00a77zostal zabity. kill=\u00a7c{0} \u00a77zostal zabity.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a74Ten zestaw nie istnieje lub zostal zle zdefininowany. kitError2=\u00a74Ten zestaw nie istnieje lub zostal zle zdefininowany.
kitError=\u00a74Nie ma prawidlowych zestawow. kitError=\u00a74Nie ma prawidlowych zestawow.
kitErrorHelp=\u00a74Byc moze przedmiotowi brakuje ilosci w konfiguracji? kitErrorHelp=\u00a74Byc moze przedmiotowi brakuje ilosci w konfiguracji?

View File

@ -212,6 +212,7 @@ kickDefault=Kickado do servidor.
kickExempt=\u00a7cVoc\u00ea nao pode kickar esta pessoa. kickExempt=\u00a7cVoc\u00ea nao pode kickar esta pessoa.
kickedAll=\u00a7cKicked all players from server kickedAll=\u00a7cKicked all players from server
kill=\u00a77Assassinado {0}. kill=\u00a77Assassinado {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cEsse kit nao existe ou foi definido impropiamente. kitError2=\u00a7cEsse kit nao existe ou foi definido impropiamente.
kitError=\u00a7cNao existe kits v\u00e1lidos. kitError=\u00a7cNao existe kits v\u00e1lidos.
kitErrorHelp=\u00a7cTalvez um item esta faltando a quantidade nas configura\u00e7\u00f5es? kitErrorHelp=\u00a7cTalvez um item esta faltando a quantidade nas configura\u00e7\u00f5es?

View File

@ -212,6 +212,7 @@ kickDefault=Ai fost dat afara de pe server.
kickExempt=\u00a74Nu poti da afara acest jucator. kickExempt=\u00a74Nu poti da afara acest jucator.
kickedAll=\u00a74Ai dat afara toti jucatorii de pe server. kickedAll=\u00a74Ai dat afara toti jucatorii de pe server.
kill=\u00a76Ai ucis (pe)\u00a7c {0} \u00a76. kill=\u00a76Ai ucis (pe)\u00a7c {0} \u00a76.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a74Acest kit nu exista sau nu a fost bine definit. kitError2=\u00a74Acest kit nu exista sau nu a fost bine definit.
kitError=\u00a74Nu sunt kituri valide. kitError=\u00a74Nu sunt kituri valide.
kitErrorHelp=\u00a74Poate ca un obiect lipseste din cantitate in configuratie? kitErrorHelp=\u00a74Poate ca un obiect lipseste din cantitate in configuratie?

View File

@ -212,6 +212,7 @@ kickDefault=Utsparkad fr\u00e5n server
kickExempt=\u00a7cDu kan inte sparka ut den spelaren. kickExempt=\u00a7cDu kan inte sparka ut den spelaren.
kickedAll=\u00a7cSparkade ut alla spelare fr\u00e5n servern kickedAll=\u00a7cSparkade ut alla spelare fr\u00e5n servern
kill=\u00a77D\u00f6dade {0}. kill=\u00a77D\u00f6dade {0}.
killExempt=\u00a74You can not kill {0}
kitError2=\u00a7cDet kit:et finns inte eller har blivit felaktigt definierat. kitError2=\u00a7cDet kit:et finns inte eller har blivit felaktigt definierat.
kitError=\u00a7cDet finns inga giltiga kit. kitError=\u00a7cDet finns inga giltiga kit.
kitErrorHelp=\u00a7cKanske en sak fattar m\u00e4ngd i konfigurationen? kitErrorHelp=\u00a7cKanske en sak fattar m\u00e4ngd i konfigurationen?