mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Provide a default for health (#3806)
This commit is contained in:
parent
dd4f26a9cf
commit
9cf8f608d8
@ -106,7 +106,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
$health = $this->namedtag->getShort("Health");
|
||||
$this->namedtag->removeTag("Health");
|
||||
}else{
|
||||
$health = $this->namedtag->getFloat("Health");
|
||||
$health = $this->namedtag->getFloat("Health", $this->getMaxHealth());
|
||||
}
|
||||
|
||||
$this->setHealth($health);
|
||||
|
Loading…
x
Reference in New Issue
Block a user