Property | Type | Description | |
---|---|---|---|
$hotbar | int[] | ||
$itemInHandIndex |
Method | Description | |
---|---|---|
__construct ( |
||
clear ( $index, $send = true ) | ||
clearAll ( ) | ||
getArmorContents ( ) : |
||
getArmorItem ( $index ) | ||
getBoots ( ) | ||
getChestplate ( ) | ||
getHeldItemIndex ( ) : integer | ||
getHeldItemSlot ( ) : integer | ||
getHelmet ( ) | ||
getHolder ( ) : |
||
getHotbar ( ) : int[] | ||
getHotbarSize ( ) | ||
getHotbarSlotIndex ( integer $index ) : integer | ||
getItemInHand ( ) : |
||
getLeggings ( ) | ||
getSize ( ) | ||
onSlotChange ( $index, $before, $send ) | ||
sendArmorContents ( |
||
sendArmorSlot ( integer $index, |
||
sendContents ( |
||
sendHeldItem ( |
||
sendSlot ( integer $index, |
||
setArmorContents ( array $items ) | ||
setArmorItem ( $index, |
||
setBoots ( |
||
setChestplate ( |
||
setHeldItemIndex ( integer $hotbarSlotIndex, boolean $sendToHolder = true, integer $slotMapping = null ) | ||
setHeldItemSlot ( integer $slot ) | ||
setHelmet ( |
||
setHotbarSlotIndex ( $index, $slot ) | ||
setItem ( $index, |
||
setItemInHand ( |
||
setLeggings ( |
||
setSize ( $size ) |
public __construct ( |
||
$player |
public getHeldItemIndex ( ) : integer | ||
return | integer | Returns the index of the inventory slot the player is currently holding |
public getHeldItemSlot ( ) : integer | ||
return | integer | Returns the inventory slot index of the currently equipped slot |
public getHolder ( ) : |
||
return |
public getHotbar ( ) : int[] | ||
return | int[] | Returns an array of hotbar indices |
public getHotbarSlotIndex ( integer $index ) : integer | ||
$index | integer | |
return | integer | Returns the index of the inventory slot linked to the specified hotbar slot |
public getItemInHand ( ) : |
||
return | Returns the item the player is currently holding |
public sendArmorContents ( |
||
$target |
public sendArmorSlot ( integer $index, |
||
$index | integer | |
$target |
public sendContents ( |
||
$target |
public sendHeldItem ( |
||
$target |
public setChestplate ( |
||
$chestplate |
public setHeldItemIndex ( integer $hotbarSlotIndex, boolean $sendToHolder = true, integer $slotMapping = null ) | ||
$hotbarSlotIndex | integer | |
$sendToHolder | boolean | |
$slotMapping | integer | Sets which hotbar slot the player is currently holding. Allows slot remapping as specified by a MobEquipmentPacket. DO NOT CHANGE SLOT MAPPING IN PLUGINS! This new implementation is fully compatible with older APIs. NOTE: Slot mapping is the raw slot index sent by MCPE, which will be between 9 and 44. |
public setItem ( $index, |
||
$item |
public setItemInHand ( |
||
$item | ||
return | boolean | Sets the item in the inventory slot the player is currently holding. |