This commit is contained in:
Shoghi Cervantes 2014-02-14 20:56:00 +01:00
parent dfe7269019
commit 08149fa4b3

View File

@ -164,7 +164,7 @@ class Entity extends Position{
} }
public function getDrops(){ 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(); $inv = array();
for($i = 0; $i < PLAYER_SURVIVAL_SLOTS; ++$i){ for($i = 0; $i < PLAYER_SURVIVAL_SLOTS; ++$i){
$slot = $this->player->getSlot($i); $slot = $this->player->getSlot($i);