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 | 532ecab05e96956934cb1477c6d2ce4cfe514390 (patch) | |
tree | b2a1e6167368d4326711af66719ab0521c2b6771 | |
parent | e130bca4c547c6aa7cf8ae36b1cc9c33aa34eed4 (diff) | |
download | Essentials-532ecab05e96956934cb1477c6d2ce4cfe514390.tar Essentials-532ecab05e96956934cb1477c6d2ce4cfe514390.tar.gz Essentials-532ecab05e96956934cb1477c6d2ce4cfe514390.tar.lz Essentials-532ecab05e96956934cb1477c6d2ce4cfe514390.tar.xz Essentials-532ecab05e96956934cb1477c6d2ce4cfe514390.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()) |