|
| __construct (Human $player) |
|
| getSize () |
|
| setSize ($size) |
|
| getHotbarSlotIndex ($index) |
|
| setHotbarSlotIndex ($index, $slot) |
|
| getHeldItemIndex () |
|
| setHeldItemIndex ($index) |
|
| getItemInHand () |
|
| setItemInHand (Item $item) |
|
| getHeldItemSlot () |
|
| setHeldItemSlot ($slot) |
|
| sendHeldItem ($target) |
|
| onSlotChange ($index, $before) |
|
| getHotbarSize () |
|
| getArmorItem ($index) |
|
| setArmorItem ($index, Item $item) |
|
| getHelmet () |
|
| getChestplate () |
|
| getLeggings () |
|
| getBoots () |
|
| setHelmet (Item $helmet) |
|
| setChestplate (Item $chestplate) |
|
| setLeggings (Item $leggings) |
|
| setBoots (Item $boots) |
|
| setItem ($index, Item $item) |
|
| clear ($index) |
|
| getArmorContents () |
|
| clearAll () |
|
| sendArmorContents ($target) |
|
| setArmorContents (array $items) |
|
| sendContents ($target) |
|
| getHolder () |
|
| __construct (InventoryHolder $holder, InventoryType $type, array $items=[], $overrideSize=null, $overrideTitle=null) |
|
| getSize () |
|
| setSize ($size) |
|
| getMaxStackSize () |
|
| getName () |
|
| getTitle () |
|
| getItem ($index) |
|
| getContents () |
|
| setContents (array $items) |
|
| setItem ($index, Item $item) |
|
| contains (Item $item) |
|
| all (Item $item) |
|
| remove (Item $item) |
|
| first (Item $item) |
|
| firstEmpty () |
|
| canAddItem (Item $item) |
|
| clear ($index) |
|
| clearAll () |
|
| getViewers () |
|
| getHolder () |
|
| setMaxStackSize ($size) |
|
| open (Player $who) |
|
| close (Player $who) |
|
| onOpen (Player $who) |
|
| onClose (Player $who) |
|
| onSlotChange ($index, $before) |
|
| sendContents ($target) |
|
| sendSlot ($index, $target) |
|
| getType () |
|
| addItem (...$slots) |
|
| removeItem (...$slots) |
|
|
| $itemInHandIndex = 0 |
|
| $hotbar |
|
| $type |
|
| $maxStackSize = Inventory::MAX_STACK |
|
| $size |
|
| $name |
|
| $title |
|
| $slots = [] |
|
| $viewers = [] |
|
| $holder |
|
Will clear a specific slot
- Parameters
-
- Returns
- bool
Implements Inventory.
onSlotChange |
( |
|
$index, |
|
|
|
$before |
|
) |
| |
sendArmorContents |
( |
|
$target | ) |
|
setArmorContents |
( |
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.
setItemInHand |
( |
Item |
$item | ) |
|
The documentation for this class was generated from the following file:
- /Users/Kids/Desktop/Doxygen/pocketmine/inventory/PlayerInventory.php