Свойство | Тип | Описание | |
---|---|---|---|
$hotbar | int[] | ||
$itemInHandIndex |
Метод | Описание | |
---|---|---|
__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 getArmorContents ( ) : |
||
Результат |
public getHeldItemIndex ( ) : integer | ||
Результат | integer | Returns the index of the inventory slot the player is currently holding |
public getHeldItemSlot ( ) : integer | ||
Результат | integer | Returns the inventory slot index of the currently equipped slot |
public getHolder ( ) : |
||
Результат |
public getHotbar ( ) : int[] | ||
Результат | int[] | Returns an array of hotbar indices |
public getHotbarSlotIndex ( integer $index ) : integer | ||
$index | integer | |
Результат | integer | Returns the index of the inventory slot linked to the specified hotbar slot |
public getItemInHand ( ) : |
||
Результат | 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 setArmorItem ( $index, |
||
$item |
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 | ||
Результат | boolean | Sets the item in the inventory slot the player is currently holding. |