mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 10:31:51 +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");
|
$health = $this->namedtag->getShort("Health");
|
||||||
$this->namedtag->removeTag("Health");
|
$this->namedtag->removeTag("Health");
|
||||||
}else{
|
}else{
|
||||||
$health = $this->namedtag->getFloat("Health");
|
$health = $this->namedtag->getFloat("Health", $this->getMaxHealth());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setHealth($health);
|
$this->setHealth($health);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user