summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java5
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())