Object check - Fixes #537

This commit is contained in:
williamtdr 2013-07-31 22:38:17 -05:00
parent 330e06b892
commit 4c73629b9e

View File

@ -1492,10 +1492,14 @@ class Player{
} }
$this->craftingItems = array(); $this->craftingItems = array();
$this->toCraft = array(); $this->toCraft = array();
$this->entity->fire = 0; if($this->entity instanceof Entity){
$this->entity->air = 300; $this->entity->fire = 0;
$this->entity->setHealth(20, "respawn"); $this->entity->air = 300;
$this->entity->updateMetadata(); $this->entity->setHealth(20, "respawn");
$this->entity->updateMetadata();
} else {
break;
}
$this->sendInventory(); $this->sendInventory();
$this->teleport($this->spawnPosition); $this->teleport($this->spawnPosition);
$this->blocked = false; $this->blocked = false;