PHP Class pocketmine\tile\Dispenser

Inheritance: extends Spawnable, implements pocketmine\inventory\InventoryHolder, implements pocketmine\tile\Container, implements pocketmine\tile\Nameable
Show file Open project: iTXTech/Genisys

Protected Properties

Property Type Description
$inventory pocketmine\inventory\DispenserInventory

Public Methods

Method Description
__construct ( pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt )
activate ( )
close ( )
getInventory ( ) : DispenserInventory
getItem ( integer $index ) : Item This method should not be used by plugins, use the Inventory
getMotion ( )
getName ( ) : string
getSize ( ) : integer
getSpawnCompound ( )
hasName ( )
saveNBT ( )
setItem ( integer $index, Item $item ) : boolean This method should not be used by plugins, use the Inventory
setName ( $str )

Protected Methods

Method Description
getSlotIndex ( $index ) : integer

Method Details

__construct() public method

public __construct ( pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt )
$chunk pocketmine\level\format\FullChunk
$nbt pocketmine\nbt\tag\CompoundTag

activate() public method

public activate ( )

close() public method

public close ( )

getInventory() public method

public getInventory ( ) : DispenserInventory
return pocketmine\inventory\DispenserInventory

getItem() public method

This method should not be used by plugins, use the Inventory
public getItem ( integer $index ) : Item
$index integer
return pocketmine\item\Item

getMotion() public method

public getMotion ( )

getName() public method

public getName ( ) : string
return string

getSize() public method

public getSize ( ) : integer
return integer

getSlotIndex() protected method

protected getSlotIndex ( $index ) : integer
$index
return integer

getSpawnCompound() public method

public getSpawnCompound ( )

hasName() public method

public hasName ( )

saveNBT() public method

public saveNBT ( )

setItem() public method

This method should not be used by plugins, use the Inventory
public setItem ( integer $index, Item $item ) : boolean
$index integer
$item pocketmine\item\Item
return boolean

setName() public method

public setName ( $str )

Property Details

$inventory protected property

protected DispenserInventory,pocketmine\inventory $inventory
return pocketmine\inventory\DispenserInventory