PHP Class pocketmine\inventory\BaseInventory

Inheritance: implements pocketmine\inventory\Inventory
Afficher le fichier Open project: iTXTech/Genisys Class Usage Examples

Protected Properties

Свойство Type Description
$holder pocketmine\inventory\InventoryHolder
$maxStackSize integer
$name string
$size integer
$slots pocketmine\item\Item[]
$title string
$type InventoryType
$viewers pocketmine\Player[]

Méthodes publiques

Méthode Description
__construct ( pocketmine\inventory\InventoryHolder $holder, InventoryType $type, array $items = [], integer $overrideSize = null, string $overrideTitle = null )
__destruct ( )
addItem ( $slots )
all ( Item $item )
canAddItem ( Item $item )
clear ( $index, $send = true )
clearAll ( $send = true )
close ( Player $who )
contains ( Item $item )
first ( Item $item )
firstEmpty ( )
firstOccupied ( )
getContents ( )
getHolder ( )
getHotbarSize ( )
getItem ( $index )
getMaxStackSize ( )
getName ( ) : string
getSize ( )
getTitle ( )
getType ( )
getViewers ( ) : Player[]
onClose ( Player $who )
onOpen ( Player $who )
onSlotChange ( $index, $before, $send )
open ( Player $who )
processSlotChange ( pocketmine\inventory\Transaction $transaction ) : boolean
remove ( Item $item, $send = true )
removeItem ( $slots )
sendContents ( Player | Player[] $target )
sendSlot ( integer $index, Player | Player[] $target )
setContents ( array $items, $send = true )
setItem ( $index, Item $item, $send = true )
setMaxStackSize ( $size )
setSize ( $size )
slotContains ( $slot, Item $item, $matchCount = false )

Method Details

__construct() public méthode

public __construct ( pocketmine\inventory\InventoryHolder $holder, InventoryType $type, array $items = [], integer $overrideSize = null, string $overrideTitle = null )
$holder pocketmine\inventory\InventoryHolder
$type InventoryType
$items array
$overrideSize integer
$overrideTitle string

__destruct() public méthode

public __destruct ( )

addItem() public méthode

public addItem ( $slots )

all() public méthode

public all ( Item $item )
$item pocketmine\item\Item

canAddItem() public méthode

public canAddItem ( Item $item )
$item pocketmine\item\Item

clear() public méthode

public clear ( $index, $send = true )

clearAll() public méthode

public clearAll ( $send = true )

close() public méthode

public close ( Player $who )
$who pocketmine\Player

contains() public méthode

public contains ( Item $item )
$item pocketmine\item\Item

first() public méthode

public first ( Item $item )
$item pocketmine\item\Item

firstEmpty() public méthode

public firstEmpty ( )

firstOccupied() public méthode

public firstOccupied ( )

getContents() public méthode

public getContents ( )

getHolder() public méthode

public getHolder ( )

getHotbarSize() public méthode

public getHotbarSize ( )

getItem() public méthode

public getItem ( $index )

getMaxStackSize() public méthode

public getMaxStackSize ( )

getName() public méthode

public getName ( ) : string
Résultat string

getSize() public méthode

public getSize ( )

getTitle() public méthode

public getTitle ( )

getType() public méthode

public getType ( )

getViewers() public méthode

public getViewers ( ) : Player[]
Résultat pocketmine\Player[]

onClose() public méthode

public onClose ( Player $who )
$who pocketmine\Player

onOpen() public méthode

public onOpen ( Player $who )
$who pocketmine\Player

onSlotChange() public méthode

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

open() public méthode

public open ( Player $who )
$who pocketmine\Player

processSlotChange() public méthode

public processSlotChange ( pocketmine\inventory\Transaction $transaction ) : boolean
$transaction pocketmine\inventory\Transaction
Résultat boolean

remove() public méthode

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

removeItem() public méthode

public removeItem ( $slots )

sendContents() public méthode

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

sendSlot() public méthode

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

setContents() public méthode

public setContents ( array $items, $send = true )
$items array

setItem() public méthode

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

setMaxStackSize() public méthode

public setMaxStackSize ( $size )

setSize() public méthode

public setSize ( $size )

slotContains() public méthode

public slotContains ( $slot, Item $item, $matchCount = false )
$item pocketmine\item\Item

Property Details

$holder protected_oe property

protected InventoryHolder,pocketmine\inventory $holder
Résultat pocketmine\inventory\InventoryHolder

$maxStackSize protected_oe property

protected int $maxStackSize
Résultat integer

$name protected_oe property

protected string $name
Résultat string

$size protected_oe property

protected int $size
Résultat integer

$slots protected_oe property

protected Item[],pocketmine\item $slots
Résultat pocketmine\item\Item[]

$title protected_oe property

protected string $title
Résultat string

$type protected_oe property

protected InventoryType,pocketmine\inventory $type
Résultat InventoryType

$viewers protected_oe property

protected Player[],pocketmine $viewers
Résultat pocketmine\Player[]