BlockItemPickupEvent
Extends BlockEvent
Implements Cancellable
Called when a block picks up an item, arrow, etc.
Methods
__construct()
php
public function __construct(\pocketmine\block\Block $collector, \pocketmine\entity\Entity $origin, \pocketmine\item\Item $item, ?\pocketmine\inventory\Inventory $inventory)getInventory()
php
public function getInventory() : ?\pocketmine\inventory\InventoryInventory to which received items will be added.
getItem()
php
public function getItem() : \pocketmine\item\ItemItems to be received
getOrigin()
php
public function getOrigin() : \pocketmine\entity\EntitysetInventory()
php
public function setInventory(?\pocketmine\inventory\Inventory $inventory) : voidChange the inventory to which received items are added.
setItem()
php
public function setItem(\pocketmine\item\Item $item) : voidChange the items to receive.
