From c36c0dfa6663a717a5504de7fb9839e86a7b1baa Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 15 Apr 2015 13:04:53 +0200 Subject: [PATCH] Fixed health boost addition --- src/pocketmine/entity/Entity.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index dd9d49f16..7f69b9f94 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -571,9 +571,7 @@ abstract class Entity extends Location implements Metadatable{ if($this->dead !== true){ $this->kill(); } - }elseif($amount > $this->getMaxHealth()){ - $this->health = $this->getMaxHealth(); - }else{ + }elseif($amount <= $this->getMaxHealth() or $amount < $this->health){ $this->health = (int) $amount; } }