diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-21 16:58:02 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-21 16:58:02 +0000 |
commit | a86fbddc61598a49587a8051442b6780f102f9b8 (patch) | |
tree | ddf272bc283c76592f96fd8275247a407c9868e0 /EssentialsProtect/src/com/earth2me | |
parent | 5fbee1f39e226ef4d5dfb24e5263117f59d8c6f5 (diff) | |
download | Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.tar Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.tar.gz Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.tar.lz Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.tar.xz Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.zip |
CB 697
Fixes spawning of web and new rails.
New config: Disable Lightning damage for players.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1258 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsProtect/src/com/earth2me')
-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;
+ }
}
}
|