Méthode |
Description |
|
addItem ( $slots ) : Item[] |
Stores the given Items in the inventory. This will try to fill
existing stacks and empty slots as well as it can. |
|
all ( Item $item ) : Item[] |
Will return all the Items that has the same id and metadata (if not null). |
|
canAddItem ( Item $item ) : boolean |
Checks if a given Item can be added to the inventory |
|
clear ( integer $index ) : boolean |
Will clear a specific slot |
|
clearAll ( ) |
Clears all the slots |
|
close ( Player $who ) |
|
|
contains ( Item $item ) : boolean |
Checks if the inventory contains any Item with the same material data. |
|
first ( Item $item ) : integer |
Will return the first slot has the same id and metadata (if not null) as the Item. |
|
firstEmpty ( ) : integer |
Returns the first empty slot, or -1 if not found |
|
getContents ( ) : Item[] |
|
|
getHolder ( ) : pocketmine\inventory\InventoryHolder |
|
|
getItem ( integer $index ) : Item |
|
|
getMaxStackSize ( ) |
|
|
getName ( ) |
|
|
getSize ( ) |
|
|
getTitle ( ) |
|
|
getType ( ) : InventoryType |
|
|
getViewers ( ) : Player[] |
Gets all the Players viewing the inventory
Players will view their inventory at all times, even when not open. |
|
onClose ( Player $who ) |
|
|
onOpen ( Player $who ) |
|
|
onSlotChange ( integer $index, Item $before, boolean $send ) |
|
|
open ( Player $who ) : boolean |
Tries to open the inventory to a player |
|
remove ( Item $item ) |
Will remove all the Items that has the same id and metadata (if not null) |
|
removeItem ( $slots ) : Item[] |
Removes the given Item from the inventory. |
|
sendContents ( Player | Player[] $target ) |
|
|
sendSlot ( integer $index, Player | Player[] $target ) |
|
|
setContents ( array $items ) |
|
|
setItem ( integer $index, Item $item ) : boolean |
Puts an Item in a slot. |
|
setMaxStackSize ( integer $size ) |
|
|