diff --git a/src/world/Entity.php b/src/world/Entity.php index 11e3e81f8..372185a2b 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -164,7 +164,7 @@ class Entity extends Position{ } public function getDrops(){ - if($this->class === ENTITY_PLAYER and ($this->player->gamemode & 0x01) === 0){ + if($this->class === ENTITY_PLAYER and $this->player instanceof Player ($this->player->gamemode & 0x01) === 0){ $inv = array(); for($i = 0; $i < PLAYER_SURVIVAL_SLOTS; ++$i){ $slot = $this->player->getSlot($i);