Fixed unknown and impossible crash

This commit is contained in:
Shoghi Cervantes 2014-02-01 16:26:40 +01:00
parent dbde770fce
commit 5f3829692d

View File

@ -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);
}
}