mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +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($this->isAlive() and !$this->justCreated){
|
||||
$this->kill();
|
||||
if($this->isAlive()){
|
||||
if(!$this->justCreated){
|
||||
$this->kill();
|
||||
}else{
|
||||
$this->health = 0;
|
||||
}
|
||||
}
|
||||
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
|
||||
$this->health = $amount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user