1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-13 18:14:38 +02:00

[3.0] Port kill exempt to 3.0

This commit is contained in:
Iaccidentally
2013-04-19 14:48:45 -04:00
parent a60573a8ac
commit 4cf0843dd6
3 changed files with 6 additions and 0 deletions

View File

@@ -182,6 +182,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?

View File

@@ -20,6 +20,10 @@ public class Commandkill extends EssentialsCommand
for (IUser matchPlayer : ess.getUserMap().matchUsersExcludingHidden(args[0], getPlayerOrNull(sender)))
{
if (Permissions.KILL_EXEMPT.isAuthorized(matchPlayer) && !Permissions.KILL_FORCE.isAuthorized(sender))
{
throw new Exception(_("killExempt", matchPlayer.getName()));
}
final Player player = matchPlayer.getPlayer();
final EntityDamageEvent ede = new EntityDamageEvent(
player, sender instanceof IUser && sender.getName().equals(

View File

@@ -68,6 +68,7 @@ public enum Permissions implements IPermission
KICK_EXEMPT,
KICK_NOTIFY,
KILL_FORCE,
KILL_EXEMPT,
LIST_HIDDEN,
LIGHTNING_OTHERS,
MAIL,