mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +00:00
Send correct spawn position (client-side check)
This commit is contained in:
parent
4d2dc63182
commit
40a20d1467
@ -1232,6 +1232,11 @@ class Player{
|
|||||||
$this->entity->z = $this->data->get("position")["z"];
|
$this->entity->z = $this->data->get("position")["z"];
|
||||||
if(($level = $this->server->api->level->get($this->data->get("spawn")["level"])) !== false){
|
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->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->check = false;
|
||||||
$this->entity->setName($this->username);
|
$this->entity->setName($this->username);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user