From 29ae19926883c2993b9713cb340f83c5b59cb4c8 Mon Sep 17 00:00:00 2001 From: kotyaralih <62548070+kotyaralih@users.noreply.github.com> Date: Sun, 5 Dec 2021 10:23:27 -0800 Subject: [PATCH] Update Entity.php --- src/world/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/Entity.php b/src/world/Entity.php index 971c0839..98e265ed 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 and $this->player->gamemode & 0x01 === 0){ $inv = array(); for($i = 0; $i < PLAYER_SURVIVAL_SLOTS; ++$i){ $slot = $this->player->getSlot($i);