Send correct spawn position (client-side check)

This commit is contained in:
Shoghi Cervantes 2013-09-03 22:52:17 +02:00
parent 4d2dc63182
commit 40a20d1467

View File

@ -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);