Be sure to respawn players correctly

This commit is contained in:
Shoghi Cervantes 2014-01-31 17:24:03 +01:00
parent 331904691d
commit cf554c67f2

View File

@ -1840,7 +1840,7 @@ class Player{
if($this->spawned === false){ if($this->spawned === false){
break; break;
} }
if($this->entity->dead === false){ if(@$this->entity->dead === false){
break; break;
} }
$this->craftingItems = array(); $this->craftingItems = array();
@ -1850,7 +1850,8 @@ class Player{
$this->entity->fire = 0; $this->entity->fire = 0;
$this->entity->air = 300; $this->entity->air = 300;
$this->entity->setHealth(20, "respawn"); $this->entity->setHealth(20, "respawn");
$this->entity->updateMetadata(); $this->entity->updateMetadata();
$this->entity->dead = false;
}else{ }else{
break; break;
} }