From bc2bd5fd4ff9d310eaf7614882330837a8ea957c Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Wed, 11 Jan 2023 20:33:45 +0300 Subject: [PATCH] q --- src/API/BlockAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index 75051f02..82d71e8c 100755 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -406,7 +406,7 @@ class BlockAPI{ } - if(($player->gamemode & 0x01) === 0x00 and count($drops) > 0){ + if(is_array($drops) && ($player->gamemode & 0x01) === 0x00 and count($drops) > 0){ foreach($drops as $drop){ $this->server->api->entity->drop(new Position($target->x + 0.5, $target->y, $target->z + 0.5, $target->level), BlockAPI::getItem($drop[0] & 0xFFFF, $drop[1] & 0xFFFF, $drop[2])); }