diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 1dcc52c83..45bdaebd4 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1086,7 +1086,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $this->noDamageTicks = 60; - foreach($this->usedChunks as $index => $c){ + foreach($this->usedChunks as $index => $hasSent){ + if(!$hasSent){ + continue; //this will happen when the chunk is ready to send + } Level::getXZ($index, $chunkX, $chunkZ); foreach($this->level->getChunkEntities($chunkX, $chunkZ) as $entity){ if($entity !== $this and !$entity->isClosed() and $entity->isAlive() and !$entity->isFlaggedForDespawn()){