summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
authorspeakeasy <mekevin1917@gmail.com>2011-01-22 11:29:47 +0800
committerWarren <evilseph@unaligned.org>2011-01-22 11:32:28 +0800
commit10f46b5fead01b61838189525dc57580e9e6d43d (patch)
treea163690146768dede01f82c424b4778400c6a9d6 /src/main/java/net/minecraft
parent8c91ee9c51d92fb3afb766cdb0fdcfdae86daaea (diff)
downloadcraftbukkit-10f46b5fead01b61838189525dc57580e9e6d43d.tar
craftbukkit-10f46b5fead01b61838189525dc57580e9e6d43d.tar.gz
craftbukkit-10f46b5fead01b61838189525dc57580e9e6d43d.tar.lz
craftbukkit-10f46b5fead01b61838189525dc57580e9e6d43d.tar.xz
craftbukkit-10f46b5fead01b61838189525dc57580e9e6d43d.zip
Fix NPE from location incorrectly being implemented in Explosion.
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/Explosion.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index e8a65dc8..3344eb35 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -29,10 +29,6 @@ public class Explosion {
public float f;
public Set g;
- // CraftBukkit
- // Retain where the explosion happened because the Entity no longer exists after explosion.
- private Location location;
-
public Explosion(World world, Entity entity, double d1, double d2, double d3, float f1) {
a = false;
h = new Random();
@@ -44,7 +40,6 @@ public class Explosion {
c = d2;
d = d3;
- location = entity.getBukkitEntity().getLocation();
}
public void a() {
@@ -189,6 +184,7 @@ public class Explosion {
Server server = ((WorldServer) i).getServer();
CraftWorld world = ((WorldServer) i).getWorld();
org.bukkit.entity.Entity splode = (e == null) ? null : e.getBukkitEntity();
+ Location location = new Location(world, b, c, d);
List<org.bukkit.block.Block> blocklist = new ArrayList<org.bukkit.block.Block>();
for (int j = arraylist.size() - 1; j >= 0; j--) {
@@ -198,7 +194,7 @@ public class Explosion {
blocklist.add(blox);
}
}
-
+
org.bukkit.event.Event.Type eventType = EntityExplodeEvent.Type.ENTITY_EXPLODE;
EntityExplodeEvent eee = new EntityExplodeEvent(eventType, splode, location, blocklist);
server.getPluginManager().callEvent(eee);