New permission: essentials.vanish.pvp

If you don't have this permission you cannot PVP while vanished.
This commit is contained in:
KHobbits 2012-10-07 18:10:50 +01:00
parent 63149d0b50
commit 98d657ec4b

View file

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