Fixed random NPE on startup

This commit is contained in:
Dinnerbone 2011-01-04 21:13:59 +00:00
parent ca765c3512
commit 4a9c761707

View file

@ -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