Fixed health boost addition

This commit is contained in:
Shoghi Cervantes 2015-04-15 13:04:53 +02:00
parent 64c366bdb5
commit c36c0dfa66

View File

@ -571,9 +571,7 @@ abstract class Entity extends Location implements Metadatable{
if($this->dead !== true){ if($this->dead !== true){
$this->kill(); $this->kill();
} }
}elseif($amount > $this->getMaxHealth()){ }elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
$this->health = $this->getMaxHealth();
}else{
$this->health = (int) $amount; $this->health = (int) $amount;
} }
} }