SimpleInventory
Extends BaseInventory
This class provides a complete implementation of a regular inventory.
Properties
$slots protected
php
protected \SplFixedArray $slotsMethods
__construct()
php
public function __construct(int $size)getContents()
php
public function getContents(bool $includeEmpty = false) : arraygetItem()
php
public function getItem(int $index) : \pocketmine\item\ItemgetMatchingItemCount() protected
php
protected function getMatchingItemCount(int $slot, \pocketmine\item\Item $test, bool $checkTags) : intgetSize()
php
public function getSize() : intReturns the size of the inventory.
internalSetContents() protected
php
protected function internalSetContents(array $items) : voidinternalSetItem() protected
php
protected function internalSetItem(int $index, \pocketmine\item\Item $item) : voidisSlotEmpty()
php
public function isSlotEmpty(int $index) : bool