diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-02-23 13:56:36 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-02-23 14:12:33 +0100 |
commit | 09aa37fe4a126c5fc2e557ae5b68bb58cd0a3059 (patch) | |
tree | 4d813de09480cee3083997ee192c3c9b9e35e863 /src/main/java/net/minecraft/server/EntityTNTPrimed.java | |
parent | 332d9c4f1884a03152c11ccb0b63c2e3127618ea (diff) | |
download | craftbukkit-09aa37fe4a126c5fc2e557ae5b68bb58cd0a3059.tar craftbukkit-09aa37fe4a126c5fc2e557ae5b68bb58cd0a3059.tar.gz craftbukkit-09aa37fe4a126c5fc2e557ae5b68bb58cd0a3059.tar.lz craftbukkit-09aa37fe4a126c5fc2e557ae5b68bb58cd0a3059.tar.xz craftbukkit-09aa37fe4a126c5fc2e557ae5b68bb58cd0a3059.zip |
Generic code cleanup
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityTNTPrimed.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityTNTPrimed.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java index 8b783812..4adbd862 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -1,6 +1,6 @@ package net.minecraft.server; -//CraftBukkit start +// CraftBukkit start import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.entity.CraftEntity; import org.bukkit.event.entity.ExplosionPrimedEvent; @@ -55,11 +55,10 @@ public class EntityTNTPrimed extends Entity { } if (this.a-- <= 0) { - // Craftbukkit start - // Need to reverse the order of the explosion and the entity death so we have a location for the event. + // CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event. this.h(); this.C(); - // Craftbukkit end + // CraftBukkit end } else { this.world.a("smoke", this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D); } @@ -68,15 +67,17 @@ public class EntityTNTPrimed extends Entity { private void h() { float f = 4.0F; - // Craftbukkit start + // CraftBukkit start CraftServer server = ((WorldServer) this.world).getServer(); org.bukkit.event.Event.Type eventType = ExplosionPrimedEvent.Type.EXPLOSION_PRIMED; + ExplosionPrimedEvent event = new ExplosionPrimedEvent(eventType, CraftEntity.getEntity(server, this), f, false); server.getPluginManager().callEvent(event); + if (!event.isCancelled()) { this.world.a((Entity) null, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire()); } - // Craftbukkit end + // CraftBukkit end } protected void a(NBTTagCompound nbttagcompound) { |