mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-28 06:09:57 +00:00
Fixed health setting
This commit is contained in:
parent
4fbafe7c2f
commit
f79476f530
@ -573,6 +573,8 @@ abstract class Entity extends Location implements Metadatable{
|
||||
}
|
||||
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
|
||||
$this->health = (int) $amount;
|
||||
}else{
|
||||
$this->health = $this->getMaxHealth();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user