PHP 클래스 pocketmine\inventory\PlayerInventory

상속: extends BaseInventory
파일 보기 프로젝트 열기: iTXTech/Genisys 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$hotbar int[]
$itemInHandIndex

공개 메소드들

메소드 설명
__construct ( Human $player, $contents = null )
clear ( $index, $send = true )
clearAll ( )
getArmorContents ( ) : Item[]
getArmorItem ( $index )
getBoots ( )
getChestplate ( )
getHeldItemIndex ( ) : integer
getHeldItemSlot ( ) : integer
getHelmet ( )
getHolder ( ) : Human | Player
getHotbar ( ) : int[]
getHotbarSize ( )
getHotbarSlotIndex ( integer $index ) : integer
getItemInHand ( ) : Item
getLeggings ( )
getSize ( )
onSlotChange ( $index, $before, $send )
sendArmorContents ( Player | Player[] $target )
sendArmorSlot ( integer $index, Player | Player[] $target )
sendContents ( Player | Player[] $target )
sendHeldItem ( Player | Player[] $target )
sendSlot ( integer $index, Player | Player[] $target )
setArmorContents ( array $items )
setArmorItem ( $index, Item $item )
setBoots ( Item $boots )
setChestplate ( Item $chestplate )
setHeldItemIndex ( integer $hotbarSlotIndex, boolean $sendToHolder = true, integer $slotMapping = null )
setHeldItemSlot ( integer $slot )
setHelmet ( Item $helmet )
setHotbarSlotIndex ( $index, $slot )
setItem ( $index, Item $item, $send = true )
setItemInHand ( Item $item ) : boolean
setLeggings ( Item $leggings )
setSize ( $size )

메소드 상세

__construct() 공개 메소드

public __construct ( Human $player, $contents = null )
$player pocketmine\entity\Human

clear() 공개 메소드

public clear ( $index, $send = true )

clearAll() 공개 메소드

public clearAll ( )

getArmorContents() 공개 메소드

public getArmorContents ( ) : Item[]
리턴 pocketmine\item\Item[]

getArmorItem() 공개 메소드

public getArmorItem ( $index )

getBoots() 공개 메소드

public getBoots ( )

getChestplate() 공개 메소드

public getChestplate ( )

getHeldItemIndex() 공개 메소드

public getHeldItemIndex ( ) : integer
리턴 integer Returns the index of the inventory slot the player is currently holding

getHeldItemSlot() 공개 메소드

public getHeldItemSlot ( ) : integer
리턴 integer Returns the inventory slot index of the currently equipped slot

getHelmet() 공개 메소드

public getHelmet ( )

getHolder() 공개 메소드

public getHolder ( ) : Human | Player
리턴 pocketmine\entity\Human | pocketmine\Player

getHotbar() 공개 메소드

public getHotbar ( ) : int[]
리턴 int[] Returns an array of hotbar indices

getHotbarSize() 공개 메소드

public getHotbarSize ( )

getHotbarSlotIndex() 공개 메소드

public getHotbarSlotIndex ( integer $index ) : integer
$index integer
리턴 integer Returns the index of the inventory slot linked to the specified hotbar slot

getItemInHand() 공개 메소드

public getItemInHand ( ) : Item
리턴 pocketmine\item\Item Returns the item the player is currently holding

getLeggings() 공개 메소드

public getLeggings ( )

getSize() 공개 메소드

public getSize ( )

onSlotChange() 공개 메소드

public onSlotChange ( $index, $before, $send )

sendArmorContents() 공개 메소드

public sendArmorContents ( Player | Player[] $target )
$target pocketmine\Player | pocketmine\Player[]

sendArmorSlot() 공개 메소드

public sendArmorSlot ( integer $index, Player | Player[] $target )
$index integer
$target pocketmine\Player | pocketmine\Player[]

sendContents() 공개 메소드

public sendContents ( Player | Player[] $target )
$target pocketmine\Player | pocketmine\Player[]

sendHeldItem() 공개 메소드

public sendHeldItem ( Player | Player[] $target )
$target pocketmine\Player | pocketmine\Player[]

sendSlot() 공개 메소드

public sendSlot ( integer $index, Player | Player[] $target )
$index integer
$target pocketmine\Player | pocketmine\Player[]

setArmorContents() 공개 메소드

public setArmorContents ( array $items )
$items array

setArmorItem() 공개 메소드

public setArmorItem ( $index, Item $item )
$item pocketmine\item\Item

setBoots() 공개 메소드

public setBoots ( Item $boots )
$boots pocketmine\item\Item

setChestplate() 공개 메소드

public setChestplate ( Item $chestplate )
$chestplate pocketmine\item\Item

setHeldItemIndex() 공개 메소드

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.

setHeldItemSlot() 공개 메소드

사용 중단:
public setHeldItemSlot ( integer $slot )
$slot integer

setHelmet() 공개 메소드

public setHelmet ( Item $helmet )
$helmet pocketmine\item\Item

setHotbarSlotIndex() 공개 메소드

사용 중단: Changes the linkage of the specified hotbar slot. This should never be done unless it is requested by the client.
public setHotbarSlotIndex ( $index, $slot )

setItem() 공개 메소드

public setItem ( $index, Item $item, $send = true )
$item pocketmine\item\Item

setItemInHand() 공개 메소드

public setItemInHand ( Item $item ) : boolean
$item pocketmine\item\Item
리턴 boolean Sets the item in the inventory slot the player is currently holding.

setLeggings() 공개 메소드

public setLeggings ( Item $leggings )
$leggings pocketmine\item\Item

setSize() 공개 메소드

public setSize ( $size )

프로퍼티 상세

$hotbar 보호되어 있는 프로퍼티

protected int[] $hotbar
리턴 int[]

$itemInHandIndex 보호되어 있는 프로퍼티

protected $itemInHandIndex