Update Entity.php

This commit is contained in:
kotyaralih 2021-12-05 10:23:27 -08:00
parent e0e8fbc8c4
commit 29ae199268

View file

@ -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 and $this->player->gamemode & 0x01 === 0){
$inv = array();
for($i = 0; $i < PLAYER_SURVIVAL_SLOTS; ++$i){
$slot = $this->player->getSlot($i);