mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Fixed #748 Player health not being saved [gh#748]
This commit is contained in:
parent
30483d5312
commit
7865b8dbe5
2 changed files with 6 additions and 2 deletions
|
|
@ -248,6 +248,9 @@ class Player{
|
|||
}
|
||||
}
|
||||
$this->data->set("armor", $armor);
|
||||
if($this->entity instanceof Entity){
|
||||
$this->data->set("health", $this->entity->getHealth());
|
||||
}
|
||||
$this->data->set("gamemode", $this->gamemode);
|
||||
}
|
||||
}
|
||||
|
|
@ -1220,7 +1223,8 @@ class Player{
|
|||
case 1: //Spawn!!
|
||||
if($this->spawned !== false){
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->entity->setHealth($this->data->get("health"));
|
||||
$this->spawned = true;
|
||||
$this->server->api->player->spawnAllPlayers($this);
|
||||
$this->server->api->player->spawnToAllPlayers($this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue