fixed hurt sound playing when spawning player

This commit is contained in:
GameHerobrine 2024-11-15 10:52:38 +03:00
parent 6e6dc3eb4c
commit 053ac5abb9
2 changed files with 3 additions and 3 deletions

View file

@ -1742,7 +1742,7 @@ class Player{
$pos = new Position($this->entity->x, $this->entity->y, $this->entity->z, $this->level);
$pData = $this->data->get("position");
$this->teleport($pos, $pData["yaw"] ?? false, $pData["pitch"] ?? false, true, true);
$this->entity->setHealth($this->data->get("health"), "spawn", true);
$this->entity->setHealth($this->data->get("health"), "spawn", true, false);
$this->spawned = true;
$this->server->api->player->spawnAllPlayers($this);
$this->server->api->player->spawnToAllPlayers($this);