mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-14 17:59:41 +00:00
Merge pull request #3072 from alejandroliu/Kill-entity-bug
Fixes bug #3071
This commit is contained in:
commit
ce59703dd0
@ -617,7 +617,6 @@ abstract class Entity extends Location implements Metadatable{
|
||||
|
||||
if($amount <= 0){
|
||||
if($this->isAlive()){
|
||||
$this->health = 0;
|
||||
$this->kill();
|
||||
}
|
||||
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
|
||||
@ -1424,7 +1423,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
}
|
||||
|
||||
public function kill(){
|
||||
$this->setHealth(0);
|
||||
$this->health = 0;
|
||||
$this->scheduleUpdate();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user