1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-06 22:56:41 +02:00

New Permission: essentials.god.pvp

Unless you have this permission you will be unable to attack other players while in god mode.
This commit is contained in:
KHobbits
2012-09-08 14:51:03 +01:00
parent 45135e4b63
commit c3228f1bd6
2 changed files with 6 additions and 1 deletions

View File

@@ -47,6 +47,11 @@ public class EssentialsEntityListener implements Listener
event.setCancelled(true);
}
if (attacker.isGodModeEnabled() && !attacker.isAuthorized("essentials.god.pvp"))
{
event.setCancelled(true);
}
attacker.updateActivity(true);
final List<String> commandList = attacker.getPowertool(attacker.getItemInHand());
if (commandList != null && !commandList.isEmpty())