mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-15 16:05:28 +00:00
Teleport fixes
This commit is contained in:
parent
9dd1568c40
commit
beb84ca013
@ -136,7 +136,7 @@ class PlayerAPI{
|
|||||||
if(count($params) === 3){
|
if(count($params) === 3){
|
||||||
$spawn = new Position(floatval(array_shift($params)), floatval(array_shift($params)), floatval(array_shift($params)), $issuer->level);
|
$spawn = new Position(floatval(array_shift($params)), floatval(array_shift($params)), floatval(array_shift($params)), $issuer->level);
|
||||||
}else{
|
}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);
|
$target->setSpawn($spawn);
|
||||||
|
@ -968,7 +968,6 @@ class Player{
|
|||||||
$this->server->schedule(50, array($this, "orderChunks"), array(), true);
|
$this->server->schedule(50, array($this, "orderChunks"), array(), true);
|
||||||
$this->blocked = false;
|
$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->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;
|
break;
|
||||||
case 2://Chunk loaded?
|
case 2://Chunk loaded?
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user