From 40a20d1467f54bc4ad50660f0c7611df4cc3b755 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 3 Sep 2013 22:52:17 +0200 Subject: [PATCH] Send correct spawn position (client-side check) --- src/Player.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Player.php b/src/Player.php index dab18cca..3a0ab00b 100644 --- a/src/Player.php +++ b/src/Player.php @@ -1232,6 +1232,11 @@ class Player{ $this->entity->z = $this->data->get("position")["z"]; if(($level = $this->server->api->level->get($this->data->get("spawn")["level"])) !== false){ $this->spawnPosition = new Position($this->data->get("spawn")["x"], $this->data->get("spawn")["y"], $this->data->get("spawn")["z"], $level); + $this->dataPacket(MC_SET_SPAWN_POSITION, array( + "x" => (int) $this->spawnPosition->x, + "y" => (int) $this->spawnPosition->y, + "z" => (int) $this->spawnPosition->z, + )); } $this->entity->check = false; $this->entity->setName($this->username);