mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +00:00
Entity: fixed extremely stupid bug with player respawning after ragequit
This commit is contained in:
parent
0ff21557e4
commit
094c949e86
@ -546,8 +546,12 @@ abstract class Entity{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($amount <= 0){
|
if($amount <= 0){
|
||||||
if($this->isAlive() and !$this->justCreated){
|
if($this->isAlive()){
|
||||||
$this->kill();
|
if(!$this->justCreated){
|
||||||
|
$this->kill();
|
||||||
|
}else{
|
||||||
|
$this->health = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
|
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
|
||||||
$this->health = $amount;
|
$this->health = $amount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user