|
| $type |
|
| $maxStackSize = Inventory::MAX_STACK |
|
| $size |
|
| $name |
|
| $title |
|
| $slots = [] |
|
| $viewers = [] |
|
| $holder |
|
Will return all the Items that has the same id and metadata (if not null). Won't check amount
- Parameters
-
- Returns
- Item[]
Implements Inventory.
Checks if a given Item can be added to the inventory
- Parameters
-
- Returns
- bool
Implements Inventory.
Will clear a specific slot
- Parameters
-
- Returns
- bool
Implements Inventory.
Checks if the inventory contains any Item with the same material data. It will check id, amount, and metadata (if not null)
- Parameters
-
- Returns
- bool
Implements Inventory.
Will return the first slot has the same id and metadata (if not null) as the Item. -1 if not found, will check amount
- Parameters
-
- Returns
- int
Implements Inventory.
Returns the first empty slot, or -1 if not found
- Returns
- int
Implements Inventory.
onSlotChange |
( |
|
$index, |
|
|
|
$before |
|
) |
| |
Tries to open the inventory to a player
- Parameters
-
- Returns
- bool
Implements Inventory.
Will remove all the Items that has the same id and metadata (if not null)
- Parameters
-
Implements Inventory.
sendSlot |
( |
|
$index, |
|
|
|
$target |
|
) |
| |
- Parameters
-
int | $index | |
| Player|Player[] | $target |
Implements Inventory.
setContents |
( |
array |
$items | ) |
|
setItem |
( |
|
$index, |
|
|
Item |
$item |
|
) |
| |
Puts an Item in a slot. If a plugin refuses the update or $index is invalid, it'll return false If a source Player is specified, it won't send a Inventory update to it
- Parameters
-
- Returns
- bool
Implements Inventory.
The documentation for this class was generated from the following file:
- /Users/Kids/Desktop/Doxygen/pocketmine/inventory/BaseInventory.php