Skip to content

Commit

Permalink
Fixed crash
Browse files Browse the repository at this point in the history
  • Loading branch information
shoghicp committed Aug 20, 2013
1 parent b5c9355 commit 5683dca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/API/PlayerAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function add($CID){

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(
Expand All @@ -396,7 +396,7 @@ public function spawnAllPlayers(Player $player){

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(
Expand Down

0 comments on commit 5683dca

Please sign in to comment.