summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvilSeph <evilseph@unaligned.org>2011-06-10 20:37:33 -0400
committerEvilSeph <evilseph@unaligned.org>2011-06-10 20:37:33 -0400
commitcd12f057a75868ca3eb131413494c2ee0e182497 (patch)
tree04901382cf8f25b9d0abc5086a9a424e4f2502b7
parentfb3e3ade90de27f0afb5527b860ff24743d5ef9a (diff)
downloadcraftbukkit-cd12f057a75868ca3eb131413494c2ee0e182497.tar
craftbukkit-cd12f057a75868ca3eb131413494c2ee0e182497.tar.gz
craftbukkit-cd12f057a75868ca3eb131413494c2ee0e182497.tar.lz
craftbukkit-cd12f057a75868ca3eb131413494c2ee0e182497.tar.xz
craftbukkit-cd12f057a75868ca3eb131413494c2ee0e182497.zip
Fixed cancelled lighting strikes dealing damage.
-rw-r--r--src/main/java/net/minecraft/server/WorldServer.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index dbc25308..4548d90b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -130,14 +130,15 @@ public class WorldServer extends World implements BlockChangeDelegate {
}
public boolean a(Entity entity) {
- if (super.a(entity)) {
- // CraftBukkit start
- LightningStrikeEvent lightning = new LightningStrikeEvent((org.bukkit.World) world, (org.bukkit.entity.LightningStrike) entity.getBukkitEntity());
- this.cserver.getPluginManager().callEvent(lightning);
+ // CraftBukkit start
+ LightningStrikeEvent lightning = new LightningStrikeEvent((org.bukkit.World) world, (org.bukkit.entity.LightningStrike) entity.getBukkitEntity());
+ this.cserver.getPluginManager().callEvent(lightning);
- if (lightning.isCancelled()) {
- return false;
- }
+ if (lightning.isCancelled()) {
+ return false;
+ }
+
+ if (super.a(entity)) {
this.server.serverConfigurationManager.a(entity.locX, entity.locY, entity.locZ, 512.0D, this.dimension, new Packet71Weather(entity));
// CraftBukkit end
return true;