From 5683dca9f6ab3f62e4485acf3327341076a6f6de Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 20 Aug 2013 02:57:37 +0200 Subject: [PATCH] Fixed crash --- src/API/PlayerAPI.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 7d2d89d2..07511a6a 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -378,7 +378,7 @@ class PlayerAPI{ public function spawnAllPlayers(Player $player){ foreach($this->getAll() as $p){ - if($p !== $player){ + if($p !== $player and ($p->entity instanceof Entity)){ $p->entity->spawn($player); if($p->level !== $player->level){ $player->dataPacket(MC_MOVE_ENTITY_POSROT, array( @@ -396,7 +396,7 @@ class PlayerAPI{ public function spawnToAllPlayers(Player $player){ foreach($this->getAll() as $p){ - if($p !== $player){ + if($p !== $player and ($p->entity instanceof Entity)){ $player->entity->spawn($p); if($p->level !== $player->level){ $p->dataPacket(MC_MOVE_ENTITY_POSROT, array(