mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Be sure to respawn players correctly
This commit is contained in:
@@ -1840,7 +1840,7 @@ class Player{
|
||||
if($this->spawned === false){
|
||||
break;
|
||||
}
|
||||
if($this->entity->dead === false){
|
||||
if(@$this->entity->dead === false){
|
||||
break;
|
||||
}
|
||||
$this->craftingItems = array();
|
||||
@@ -1851,6 +1851,7 @@ class Player{
|
||||
$this->entity->air = 300;
|
||||
$this->entity->setHealth(20, "respawn");
|
||||
$this->entity->updateMetadata();
|
||||
$this->entity->dead = false;
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user