From fc60abe5e52ff4a20e712318363c1593ed865e9f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 29 Jun 2020 22:41:17 +0100 Subject: [PATCH] Player: fixed a few phpstan level 8 warnings --- src/player/Player.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/player/Player.php b/src/player/Player.php index 2d8feec1e..a110daacd 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -2078,10 +2078,11 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener, } if($this->hasValidCustomSpawn()){ - $nbt->setString("SpawnLevel", $this->spawnPosition->getWorld()->getFolderName()); - $nbt->setInt("SpawnX", $this->spawnPosition->getFloorX()); - $nbt->setInt("SpawnY", $this->spawnPosition->getFloorY()); - $nbt->setInt("SpawnZ", $this->spawnPosition->getFloorZ()); + $spawn = $this->getSpawn(); + $nbt->setString("SpawnLevel", $spawn->getWorld()->getFolderName()); + $nbt->setInt("SpawnX", $spawn->getFloorX()); + $nbt->setInt("SpawnY", $spawn->getFloorY()); + $nbt->setInt("SpawnZ", $spawn->getFloorZ()); } if(!$this->isAlive()){