From 3cffa66490579783186803d787abbce4fe667972 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 3 Dec 2013 22:25:25 +0100 Subject: [PATCH] added Entity::setHealth() force --- src/world/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/Entity.php b/src/world/Entity.php index 695eb1c3..d160cc7a 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -956,7 +956,7 @@ class Entity extends Position{ }elseif($health === $this->health){ return false; } - if($this->server->api->dhandle("entity.health.change", array("entity" => $this, "eid" => $this->eid, "health" => $health, "cause" => $cause)) !== false){ + if($this->server->api->dhandle("entity.health.change", array("entity" => $this, "eid" => $this->eid, "health" => $health, "cause" => $cause)) !== false or $force === true){ $this->health = min(127, max(-127, $health)); $this->server->query("UPDATE entities SET health = ".$this->health." WHERE EID = ".$this->eid.";"); if($harm === true){