From 86fef037e02b8a954e4b6d7027dbcc1675eec5dd Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Sat, 7 Jan 2012 19:12:38 -0500 Subject: [PATCH] Fixed NPE in World. Fixes BUKKIT-306. Thanks Evenprime! --- src/main/java/net/minecraft/server/World.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index ea939f8661..59531c1643 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);