Guard against null chunk in packethandler

This commit is contained in:
Vincent Lee committed 2016-05-02 19:24:13 -05:00
1 parent 8f4f63453a
commit 3996c5d078
1 file changed
+3
@@ -28,6 +28,9 @@ public final class PacketHandler {
WorldServer ws = ((WorldServer) world);
PlayerManager.PlayerInstance chunk = ws.getPlayerChunkMap().getEntry(pos.getX() >> 4, pos.getZ() >> 4);
if(chunk == null)
return;
for (EntityPlayer player : ws.playerEntities) {
EntityPlayerMP playerMP = ((EntityPlayerMP) player);