Better /kill command, ensures death

This commit is contained in:
Shoghi Cervantes
2013-06-07 12:54:45 +02:00
parent c37c6da42d
commit 35c0c21c8d
2 changed files with 3 additions and 2 deletions

View File

@@ -782,7 +782,7 @@ class Entity extends Position{
}
public function harm($dmg, $cause = "generic", $force = false){
return $this->setHealth($this->getHealth() - ((int) $dmg), $cause, $force);
return $this->setHealth(max(-128, $this->getHealth() - ((int) $dmg)), $cause, $force);
}
public function heal($health, $cause = "generic"){