From d92a6240d89f5f1a2f9c119d30e5003b0e88cf24 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 27 Jun 2017 13:36:26 +0100 Subject: [PATCH] Moved spawn check to sendChunk() instead of sendNextChunk(), fix #828 doesn't make sense to put it anywhere else regardless... --- src/pocketmine/Player.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 93b0a70f7..79de77b40 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -826,6 +826,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade } } } + + if($this->chunkLoadCount >= $this->spawnThreshold and $this->spawned === false and $this->teleportPosition === null){ + $this->doFirstSpawn(); + } } protected function sendNextChunk(){ @@ -859,10 +863,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade $this->level->requestChunk($X, $Z, $this); } - if($this->chunkLoadCount >= $this->spawnThreshold and $this->spawned === false and $this->teleportPosition === null){ - $this->doFirstSpawn(); - } - Timings::$playerChunkSendTimer->stopTiming(); }