diff options
Diffstat (limited to 'EssentialsProtect/src')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index b0f0804cb..19c808d5f 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -111,7 +111,7 @@ public class EssentialsProtectEntityListener extends EntityListener return;
}
}
-
+
DamageCause cause = event.getCause();
Entity casualty = event.getEntity();
if (casualty instanceof Player)
@@ -138,6 +138,11 @@ public class EssentialsProtectEntityListener extends EntityListener event.setCancelled(true);
return;
}
+ if (EssentialsProtect.playerSettings.get("protect.disable.lightning") && cause == DamageCause.LIGHTNING)
+ {
+ event.setCancelled(true);
+ return;
+ }
}
}
|