Skip to content

DelegateInventory ​

class · pocketmine\inventory\DelegateInventory · source

Extends BaseInventory

An inventory which is backed by another inventory, and acts as a proxy to that inventory.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\inventory\Inventory $backingInventory)

__destruct() ​

php
public function __destruct()

getContents() ​

php
public function getContents(bool $includeEmpty = false) : array

getItem() ​

php
public function getItem(int $index) : \pocketmine\item\Item

getSize() ​

php
public function getSize() : int

internalSetContents() protected ​

php
protected function internalSetContents(array $items) : void

internalSetItem() protected ​

php
protected function internalSetItem(int $index, \pocketmine\item\Item $item) : void

isSlotEmpty() ​

php
public function isSlotEmpty(int $index) : bool

onContentChange() protected ​

php
protected function onContentChange(array $itemsBefore) : void

onSlotChange() protected ​

php
protected function onSlotChange(int $index, \pocketmine\item\Item $before) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.