mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
Better /kill command, ensures death
This commit is contained in:
@@ -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"){
|
||||
|
Reference in New Issue
Block a user