diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 947506f86..c67d21511 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2682,7 +2682,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $this->server->getPluginManager()->callEvent($ev = new PlayerRespawnEvent($this, $this->getSpawn())); - $realSpawn = $ev->getRespawnPosition()->add(0.5, 0, 0.5); + $realSpawn = Position::fromObject($ev->getRespawnPosition()->add(0.5, 0, 0.5), $ev->getRespawnPosition()->getLevel()); if($realSpawn->distanceSquared($this->getSpawn()->add(0.5, 0, 0.5)) > 0.01){ $this->teleport($realSpawn); //If the destination was modified by plugins