From 4a9c761707fbdaeacadac3cb894aeff8a231e365 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Tue, 4 Jan 2011 21:13:59 +0000 Subject: [PATCH] Fixed random NPE on startup --- src/main/java/net/minecraft/server/WorldServer.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index 8936121f30..da6b8dd411 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -75,10 +75,12 @@ public class WorldServer extends World { if (block != null) { // CraftBukkit start - BlockPhysicsEvent event = new BlockPhysicsEvent(Event.Type.BLOCK_PHYSICS, world.getBlockAt(i1, j1, k1), l1); - server.getPluginManager().callEvent(event); - if (event.isCancelled()) { - return; + if (world != null) { + BlockPhysicsEvent event = new BlockPhysicsEvent(Event.Type.BLOCK_PHYSICS, world.getBlockAt(i1, j1, k1), l1); + server.getPluginManager().callEvent(event); + if (event.isCancelled()) { + return; + } } // CraftBukkit stop