diff options
author | Iaccidentally <coryhuckaby@gmail.com> | 2013-04-19 14:40:10 -0400 |
---|---|---|
committer | Iaccidentally <coryhuckaby@gmail.com> | 2013-04-19 14:40:10 -0400 |
commit | 0b0521104127dbbbf2a1b861d137cc2da55dcc8f (patch) | |
tree | 6091e7b35ce4f9cc39751f7ec33efbac7be2bb5f | |
parent | 9bb2e8ceb5b03b1e81fafac5279182eaa879883b (diff) | |
download | Essentials-0b0521104127dbbbf2a1b861d137cc2da55dcc8f.tar Essentials-0b0521104127dbbbf2a1b861d137cc2da55dcc8f.tar.gz Essentials-0b0521104127dbbbf2a1b861d137cc2da55dcc8f.tar.lz Essentials-0b0521104127dbbbf2a1b861d137cc2da55dcc8f.tar.xz Essentials-0b0521104127dbbbf2a1b861d137cc2da55dcc8f.zip |
[FEATURE] Add kill exempt :: new permission: essentials.kill.exempt
players with essentials.kill.force and console will still be able to override this
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandkill.java | 6 | ||||
-rw-r--r-- | Essentials/src/messages.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_cs.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_da.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_de.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_en.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_es.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_fi.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_fr.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_it.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_nl.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_pl.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_pt.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_ro.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_se.properties | 1 |
15 files changed, 19 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java index 2f719cb11..88086900a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java @@ -32,12 +32,16 @@ public class Commandkill extends EssentialsCommand final List<Player> matchedPlayers = server.matchPlayer(args[0]); 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); server.getPluginManager().callEvent(ede); if (ede.isCancelled() && sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.kill.force")) { continue; - } + } matchPlayer.damage(Short.MAX_VALUE); if (matchPlayer.getHealth() > 0) diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 3a86e73b2..84670ced6 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -212,6 +212,7 @@ kickDefault=Kicked from server. kickExempt=\u00a74You can not kick that person. kickedAll=\u00a74Kicked all players from server. kill=\u00a76Killed\u00a7c {0}\u00a76. +killExempt=\u00a74You can not kill {0} kitError2=\u00a74That kit does not exist or is improperly defined. kitError=\u00a74There are no valid kits. kitErrorHelp=\u00a74Perhaps an item is missing a quantity in the configuration? diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index eb3cff221..a0d2709e4 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -215,6 +215,7 @@ kickDefault=Vyhozen ze serveru kickExempt=\u00a7cNemuzes vyhodit tuhle osobu. kickedAll=\u00a7cKicked all players from server kill=\u00a77Zabit {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cTento kit neexistuje, nebo je chybne definovan. kitError=\u00a7cNejsou zadne validni kity. kitErrorHelp=\u00a7cPravdepodobne item nema vyplnene mnozstvi v configu? diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index ba0365694..eb1c90cd7 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -212,6 +212,7 @@ kickDefault=Kicked fra serveren. kickExempt=\u00a77Du kan ikke kicke denne spiller. kickedAll=\u00a7cKicked all players from server kill=\u00a77dr\u00e6bte {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cDette kit eksisterer ikke eller er forkert defineret. 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? diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 7124e1e35..3783cb0a9 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -212,6 +212,7 @@ kickDefault=Vom Server geworfen kickExempt=\u00a7cDu kannst diesen Spieler nicht rauswerfen. kickedAll=\u00a7cKicked all players from server kill=\u00a77{0} get\u00f6tet. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig. kitError=\u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen. kitErrorHelp=\u00a7cEventuell fehlt bei einem Gegenstand die Menge? diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 3a86e73b2..84670ced6 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -212,6 +212,7 @@ kickDefault=Kicked from server. kickExempt=\u00a74You can not kick that person. kickedAll=\u00a74Kicked all players from server. kill=\u00a76Killed\u00a7c {0}\u00a76. +killExempt=\u00a74You can not kill {0} kitError2=\u00a74That kit does not exist or is improperly defined. kitError=\u00a74There are no valid kits. kitErrorHelp=\u00a74Perhaps an item is missing a quantity in the configuration? diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 2060dbb6f..e2084f60a 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -212,6 +212,7 @@ kickDefault=Echado del servidor. kickExempt=\u00a7cNo puedes echar a esa persona. kickedAll=\u00a7cTodos los jugadores fueron kickeados. kill=\u00a77ha matado a {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cEse kit no existe o esta mal escrito. kitError=\u00a7cNo hay ningun kit valido. kitErrorHelp=\u00a7cLe falta especificar la cantidad a un item en la configuracion? diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index f406804c6..c640d51b8 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -212,6 +212,7 @@ kickDefault=Potkittu palvelimelta kickExempt=\u00a7cEt voi potkia h\u00e4nt\u00e4. kickedAll=\u00a7cPotkittu kaikki pelaajat palvelimelta kill=\u00a77Tappoi {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cTuota pakkausta ei ole olemassa tai se on v\u00e4\u00e4rin muokattu. kitError=\u00a7cEi ole sopivia pakkauksia. kitErrorHelp=\u00a7cEhk\u00e4 tavaralle ei ole m\u00e4\u00e4ritetty m\u00e4\u00e4r\u00e4\u00e4 configissa? diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 7a045f89c..d4d4eda51 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -212,6 +212,7 @@ kickDefault=\u00c9ject\u00e9 du serveur kickExempt=\u00a77Vous ne pouvez pas \u00e9jecter ce joueur. kickedAll=\u00a7cTous les joueurs ont \u00e9t\u00e9 \u00e9ject\u00e9s kill=\u00a77Tu\u00e9 {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cCe kit n'existe pas ou a \u00e9t\u00e9 mal d\u00e9fini. kitError=\u00a7cIl n'y a pas de kits valides. kitErrorHelp=\u00a7cPeut-\u00eatre qu'un objet manque d'une quantit\u00e9 dans la configuration ? diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index 9326bceac..935066387 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -212,6 +212,7 @@ kickDefault=Kickato dal server kickExempt=\u00a7cNon puoi kickare questo player. kickedAll=\u00a7cKicked all players from server kill=\u00a77Ucciso {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cQuesto kit non esiste o non e'' definito. kitError=\u00a7cNon ci sono kit validi. kitErrorHelp=\u00a7cForse una quantita'' manca in un oggetto della configurazione? diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 31ad9338c..276d8de9a 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -212,6 +212,7 @@ kickDefault=Je bent van de server afgeschopt. kickExempt=\u00a77Je kunt die speler niet van de server afschoppen. kickedAll=\u00a7cAlle spelers van de server afgeschopt. kill=\u00a77Jij doodde {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cDie kit bestaat niet of is verkeerde beschreven. kitError=\u00a7cEr zijn geen geldige kits. kitErrorHelp=\u00a7cMisschien mist er een hoeveelheid van het item in de configuratie? diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index 47535ad29..a61304d86 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -212,6 +212,7 @@ kickDefault=Zostales wyrzucony z serwera. kickExempt=\u00a74Nie mozesz wyrzucic tej osoby. kickedAll=\u00a74Wyrzucanie wszystki graczy z serwera kill=\u00a7c{0} \u00a77zostal zabity. +killExempt=\u00a74You can not kill {0} kitError2=\u00a74Ten zestaw nie istnieje lub zostal zle zdefininowany. kitError=\u00a74Nie ma prawidlowych zestawow. kitErrorHelp=\u00a74Byc moze przedmiotowi brakuje ilosci w konfiguracji? diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index 8ee78e7c0..4a5e5d900 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -212,6 +212,7 @@ kickDefault=Kickado do servidor. kickExempt=\u00a7cVoc\u00ea nao pode kickar esta pessoa. kickedAll=\u00a7cKicked all players from server kill=\u00a77Assassinado {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cEsse kit nao existe ou foi definido impropiamente. kitError=\u00a7cNao existe kits v\u00e1lidos. kitErrorHelp=\u00a7cTalvez um item esta faltando a quantidade nas configura\u00e7\u00f5es? diff --git a/Essentials/src/messages_ro.properties b/Essentials/src/messages_ro.properties index 607578a07..b28a8a80d 100644 --- a/Essentials/src/messages_ro.properties +++ b/Essentials/src/messages_ro.properties @@ -212,6 +212,7 @@ kickDefault=Ai fost dat afara de pe server. kickExempt=\u00a74Nu poti da afara acest jucator. kickedAll=\u00a74Ai dat afara toti jucatorii de pe server. kill=\u00a76Ai ucis (pe)\u00a7c {0} \u00a76. +killExempt=\u00a74You can not kill {0} kitError2=\u00a74Acest kit nu exista sau nu a fost bine definit. kitError=\u00a74Nu sunt kituri valide. kitErrorHelp=\u00a74Poate ca un obiect lipseste din cantitate in configuratie? diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties index 789e7ed37..4d9050f81 100644 --- a/Essentials/src/messages_se.properties +++ b/Essentials/src/messages_se.properties @@ -212,6 +212,7 @@ kickDefault=Utsparkad fr\u00e5n server kickExempt=\u00a7cDu kan inte sparka ut den spelaren. kickedAll=\u00a7cSparkade ut alla spelare fr\u00e5n servern kill=\u00a77D\u00f6dade {0}. +killExempt=\u00a74You can not kill {0} kitError2=\u00a7cDet kit:et finns inte eller har blivit felaktigt definierat. kitError=\u00a7cDet finns inga giltiga kit. kitErrorHelp=\u00a7cKanske en sak fattar m\u00e4ngd i konfigurationen? |