mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Better /kill command, ensures death
This commit is contained in:
parent
c37c6da42d
commit
35c0c21c8d
2 changed files with 3 additions and 2 deletions
|
|
@ -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"){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue