PlayerItemConsumeEvent
Extends PlayerEvent
Implements Cancellable
Called when a player eats something
Methods
__construct()
php
public function __construct(\pocketmine\player\Player $player, \pocketmine\item\Item $item, array $residue = [])getItem()
php
public function getItem() : \pocketmine\item\ItemgetResidue()
php
public function getResidue() : arrayReturns the leftover items returned to the player after consuming the item. For example, glass bottles for potions, bowls for beetroot soup, etc.
setResidue()
php
public function setResidue(array $items) : voidSets the items returned to the player after consuming the item.
