summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2012-01-07 19:12:38 -0500
committerEvilSeph <evilseph@gmail.com>2012-01-07 19:12:38 -0500
commit86fef037e02b8a954e4b6d7027dbcc1675eec5dd (patch)
tree76d8c18c4cf54228b8e23cd9b3e349cc5432d388 /src/main/java/net
parentb74a69041e0a86e3be167babded9399907ed9cce (diff)
downloadcraftbukkit-86fef037e02b8a954e4b6d7027dbcc1675eec5dd.tar
craftbukkit-86fef037e02b8a954e4b6d7027dbcc1675eec5dd.tar.gz
craftbukkit-86fef037e02b8a954e4b6d7027dbcc1675eec5dd.tar.lz
craftbukkit-86fef037e02b8a954e4b6d7027dbcc1675eec5dd.tar.xz
craftbukkit-86fef037e02b8a954e4b6d7027dbcc1675eec5dd.zip
Fixed NPE in World. Fixes BUKKIT-306. Thanks Evenprime!
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/World.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ea939f86..59531c16 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2565,6 +2565,9 @@ public class World implements IBlockAccess {
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
+ // CraftBukkit - fixed NPE
+ if (entityhuman1 == null || entityhuman1.dead) continue;
+
if (!entityhuman1.abilities.isInvulnerable) {
double d5 = entityhuman1.e(d0, d1, d2);