diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 9797ead87..51ab0e819 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -425,14 +425,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{ } public function getDrops(){ - $drops = []; - if($this->inventory !== null){ - foreach($this->inventory->getContents() as $item){ - $drops[] = $item; - } - } - - return $drops; + return $this->inventory !== null ? array_values($this->inventory->getContents()) : []; } public function saveNBT(){