diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 24997893f..8108a8afc 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1679,14 +1679,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade return true; } - if($this->nextChunkOrderRun-- <= 0 or $this->chunk === null){ - $this->orderChunks(); - } - - if(count($this->loadQueue) > 0 or !$this->spawned){ - $this->sendNextChunk(); - } - $this->timings->startTiming(); if($this->spawned){ @@ -1750,6 +1742,14 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade return; } + if($this->nextChunkOrderRun-- <= 0 or $this->chunk === null){ + $this->orderChunks(); + } + + if(count($this->loadQueue) > 0 or !$this->spawned){ + $this->sendNextChunk(); + } + if(count($this->batchedPackets) > 0){ $this->server->batchPackets([$this], $this->batchedPackets, false); $this->batchedPackets = [];