Fixed health setting

This commit is contained in:
Shoghi Cervantes 2015-04-15 22:00:01 +02:00
parent 4fbafe7c2f
commit f79476f530
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89

View File

@ -573,6 +573,8 @@ abstract class Entity extends Location implements Metadatable{
} }
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){ }elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
$this->health = (int) $amount; $this->health = (int) $amount;
}else{
$this->health = $this->getMaxHealth();
} }
} }