diff --git a/src/API/EntityAPI.php b/src/API/EntityAPI.php index 5e8140e31..55bff773a 100644 --- a/src/API/EntityAPI.php +++ b/src/API/EntityAPI.php @@ -110,7 +110,7 @@ class EntityAPI{ public function spawnToAll(Entity $e){ foreach($this->server->api->player->getAll($e->level) as $player){ - if($player->eid !== false and $player->eid !== $e->eid and $e->class !== ENTITY_PLAYER){ + if($player->eid !== false and $player->eid !== $e->eid and $e->class !== ENTITY_PLAYER and $e instanceof Entity){ $e->spawn($player); } }