Fix nullpointer exception

test
mckuhei 2 years ago
parent 45ea420a96
commit 4a5a8ad3b3

@ -555,9 +555,10 @@ public class WorldServer extends World
} }
public void addExtraChunk(BigInteger x, int y, BigInteger z, ExtendedBlockStorage blockStorage) { public void addExtraChunk(BigInteger x, int y, BigInteger z, ExtendedBlockStorage blockStorage) {
long time = System.currentTimeMillis(); // long time = System.currentTimeMillis();
super.addExtraChunk(x, y, z, blockStorage); super.addExtraChunk(x, y, z, blockStorage);
// System.out.println(System.currentTimeMillis() - time); // System.out.println(System.currentTimeMillis() - time);
if(thePlayerManager == null || blockStorage.isEmpty()) return;
PlayerInstance instance = thePlayerManager.getOrCreateChunkWatcher(x, z, false); PlayerInstance instance = thePlayerManager.getOrCreateChunkWatcher(x, z, false);
if(instance != null) { if(instance != null) {
instance.sendToAllPlayersWatchingChunk(new Packet57ExtraChunk(x, y, z, blockStorage)); instance.sendToAllPlayersWatchingChunk(new Packet57ExtraChunk(x, y, z, blockStorage));

Loading…
Cancel
Save