diff --git a/src/pocketmine/inventory/PlayerInventory.php b/src/pocketmine/inventory/PlayerInventory.php index 392331737..5ab19a0ae 100644 --- a/src/pocketmine/inventory/PlayerInventory.php +++ b/src/pocketmine/inventory/PlayerInventory.php @@ -40,7 +40,7 @@ class PlayerInventory extends BaseInventory{ protected $hotbar; public function __construct(Human $player){ - $this->hotbar = array_fill(0, $this->getHotbarSize(), -1); + $this->hotbar = range(0, $this->getHotbarSize() - 1, 1); parent::__construct($player, InventoryType::get(InventoryType::PLAYER)); }