PHP Class pocketmine\inventory\BaseInventory

Inheritance: implements pocketmine\inventory\Inventory
Datei anzeigen Open project: iTXTech/Genisys Class Usage Examples

Protected Properties

Property Type Description
$holder pocketmine\inventory\InventoryHolder
$maxStackSize integer
$name string
$size integer
$slots pocketmine\item\Item[]
$title string
$type InventoryType
$viewers pocketmine\Player[]

Public Methods

Method 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 method

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 method

public __destruct ( )

addItem() public method

public addItem ( $slots )

all() public method

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

canAddItem() public method

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

clear() public method

public clear ( $index, $send = true )

clearAll() public method

public clearAll ( $send = true )

close() public method

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

contains() public method

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

first() public method

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

firstEmpty() public method

public firstEmpty ( )

firstOccupied() public method

public firstOccupied ( )

getContents() public method

public getContents ( )

getHolder() public method

public getHolder ( )

getHotbarSize() public method

public getHotbarSize ( )

getItem() public method

public getItem ( $index )

getMaxStackSize() public method

public getMaxStackSize ( )

getName() public method

public getName ( ) : string
return string

getSize() public method

public getSize ( )

getTitle() public method

public getTitle ( )

getType() public method

public getType ( )

getViewers() public method

public getViewers ( ) : Player[]
return pocketmine\Player[]

onClose() public method

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

onOpen() public method

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

onSlotChange() public method

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

open() public method

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

processSlotChange() public method

public processSlotChange ( pocketmine\inventory\Transaction $transaction ) : boolean
$transaction pocketmine\inventory\Transaction
return boolean

remove() public method

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

removeItem() public method

public removeItem ( $slots )

sendContents() public method

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

sendSlot() public method

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

setContents() public method

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

setItem() public method

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

setMaxStackSize() public method

public setMaxStackSize ( $size )

setSize() public method

public setSize ( $size )

slotContains() public method

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

Property Details

$holder protected_oe property

protected InventoryHolder,pocketmine\inventory $holder
return pocketmine\inventory\InventoryHolder

$maxStackSize protected_oe property

protected int $maxStackSize
return integer

$name protected_oe property

protected string $name
return string

$size protected_oe property

protected int $size
return integer

$slots protected_oe property

protected Item[],pocketmine\item $slots
return pocketmine\item\Item[]

$title protected_oe property

protected string $title
return string

$type protected_oe property

protected InventoryType,pocketmine\inventory $type
return InventoryType

$viewers protected_oe property

protected Player[],pocketmine $viewers
return pocketmine\Player[]