public function getDrops() { $drops = []; if ($this->inventory instanceof PlayerInventory) { foreach ($this->inventory->getContents() as $item) { $drops[] = $item; } } return $drops; }
public function getDrops() { $drops = []; if ($this->inventory !== null) { foreach ($this->inventory->getContents() as $item) { $drops[] = $item; } } return $drops; }