From f79476f530238b12cf9cb0878c4f1fca795ac4c1 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 15 Apr 2015 22:00:01 +0200 Subject: [PATCH] Fixed health setting --- src/pocketmine/entity/Entity.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 2ad3161a2..3f2f99f49 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -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(); } }