Teleport fixes

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-16 18:11:26 +02:00
parent 9dd1568c40
commit beb84ca013
2 changed files with 1 additions and 2 deletions

View File

@ -136,7 +136,7 @@ class PlayerAPI{
if(count($params) === 3){
$spawn = new Position(floatval(array_shift($params)), floatval(array_shift($params)), floatval(array_shift($params)), $issuer->level);
}else{
$spawn = new Position($issuer->x, $issuer->y, $issuer->z, $issuer->level);
$spawn = new Position($issuer->entity->x, $issuer->entity->y, $issuer->entity->z, $issuer->entity->level);
}
$target->setSpawn($spawn);

View File

@ -968,7 +968,6 @@ class Player{
$this->server->schedule(50, array($this, "orderChunks"), array(), true);
$this->blocked = false;
$this->teleport(new Position($this->data->get("position")["x"], $this->data->get("position")["y"], $this->data->get("position")["z"], $this->level));
$this->setSpawn(new Vector3($this->data->get("spawn")["x"], $this->data->get("spawn")["y"], $this->data->get("spawn")["z"]), $this->data->get("spawn")["level"]);
break;
case 2://Chunk loaded?
break;