PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
|
Public Member Functions | |
addItem (Item ... $slots) | |
all (Item $item) | |
canAddItem (Item $item) | |
clear (int $index) | |
clearAll () | |
contains (Item $item) | |
first (Item $item, bool $exact=false) | |
firstEmpty () | |
getAddableItemQuantity (Item $item) | |
getContents (bool $includeEmpty=false) | |
getItem (int $index) | |
getListeners () | |
getMaxStackSize () | |
getSize () | |
getViewers () | |
isSlotEmpty (int $index) | |
onClose (Player $who) | |
onOpen (Player $who) | |
remove (Item $item) | |
removeItem (Item ... $slots) | |
setContents (array $items) | |
setItem (int $index, Item $item) | |
setMaxStackSize (int $size) | |
slotExists (int $slot) | |
swap (int $slot1, int $slot2) | |
Public Attributes | |
const | MAX_STACK = 64 |
Definition at line 26 of file TemporaryInventory.php.
|
inherited |
Stores the given Items in the inventory. This will add to any non-full existing stacks first, and then put the remaining items in empty slots if there are any available.
Returns an array of items which could not fit in the inventory.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns all matching items in the inventory, irrespective of stack size. The returned array is indexed by slot number.
If the input item has specific NBT, only items with the same type and NBT will match. Otherwise, only the item type is checked.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Checks if a given Item can be added to the inventory
Implemented in pocketmine\block\inventory\ShulkerBoxInventory, and pocketmine\inventory\BaseInventory.
|
inherited |
Will clear a specific slot
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Clears all the slots
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns whether the total amount of matching items is at least the stack size of the given item. Multiple stacks of the same item are added together.
If the input item has specific NBT, only items with the same type and NBT will match. Otherwise, only the item type is checked.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns the first slot number containing a matching item with a stack size greater than or equal to the input item.
If the input item has specific NBT, or if $exact is true, only items with the same type and NBT will match. Otherwise, only the item type is checked.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns the first empty slot, or -1 if not found
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns how many items from the given itemstack can be added to this inventory.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns an array of all the itemstacks in the inventory, indexed by their slot number. Empty slots are not included unless includeEmpty is true.
Implemented in pocketmine\block\inventory\DoubleChestInventory, pocketmine\inventory\DelegateInventory, pocketmine\inventory\SimpleInventory, and pocketmine\inventory\transaction\TransactionBuilderInventory.
|
inherited |
Returns the item in the specified slot.
Implemented in pocketmine\block\inventory\DoubleChestInventory, pocketmine\inventory\DelegateInventory, pocketmine\inventory\SimpleInventory, and pocketmine\inventory\transaction\TransactionBuilderInventory.
|
inherited |
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns the maximum stack size for items in this inventory. Individual item types (such as armor or tools) may have a smaller maximum stack size.
Implemented in pocketmine\block\inventory\CampfireInventory, and pocketmine\inventory\BaseInventory.
|
inherited |
Returns the number of slots in the inventory.
Implemented in pocketmine\block\inventory\DoubleChestInventory, pocketmine\inventory\DelegateInventory, pocketmine\inventory\SimpleInventory, and pocketmine\inventory\transaction\TransactionBuilderInventory.
|
inherited |
Gets all the Players viewing the inventory Players will view their inventory at all times, even when not open.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns whether the given slot is empty.
Implemented in pocketmine\block\inventory\DoubleChestInventory, pocketmine\inventory\BaseInventory, pocketmine\inventory\DelegateInventory, and pocketmine\inventory\SimpleInventory.
|
inherited |
Called when a player opens this inventory.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Clears all slots containing items equivalent to the given item.
If the input item has specific NBT, only items with the same type and NBT will match. Otherwise, only the item type is checked.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Removes items from the inventory in the amounts specified by the given itemstacks. Returns an array of items that couldn't be removed.
If the input item has specific NBT, only items with the same type and NBT will match. Otherwise, only the item type is checked.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Sets the contents of the inventory. Non-numeric offsets or offsets larger than the size of the inventory are ignored.
Item[] | $items | @phpstan-param array<int, Item> $items |
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Puts an Item in a slot.
Implemented in pocketmine\crafting\CraftingGrid, and pocketmine\inventory\BaseInventory.
|
inherited |
Sets the maximum stack size for items in this inventory.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Returns whether the specified slot exists in the inventory.
Implemented in pocketmine\inventory\BaseInventory.
Referenced by pocketmine\network\mcpe\InventoryManager\locateWindowAndSlot().
|
inherited |
Swaps the specified slots.
Implemented in pocketmine\inventory\BaseInventory.
|
inherited |
Definition at line 34 of file Inventory.php.