diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-10-07 18:10:50 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-10-07 18:10:50 +0100 |
commit | 98d657ec4b65658b9925a073e6803243362983f0 (patch) | |
tree | 6850fef0ea9974a7f920c5c9c088b5e7d199db31 | |
parent | 63149d0b500fd66a87c3b52c9324fca6ababb832 (diff) | |
download | Essentials-98d657ec4b65658b9925a073e6803243362983f0.tar Essentials-98d657ec4b65658b9925a073e6803243362983f0.tar.gz Essentials-98d657ec4b65658b9925a073e6803243362983f0.tar.lz Essentials-98d657ec4b65658b9925a073e6803243362983f0.tar.xz Essentials-98d657ec4b65658b9925a073e6803243362983f0.zip |
New permission: essentials.vanish.pvp
If you don't have this permission you cannot PVP while vanished.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index 693bde3ef..0c4d7b9e1 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -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()) |