CraftItemEvent
Extends Event
Implements Cancellable
Methods
__construct()
php
public function __construct(\pocketmine\inventory\transaction\CraftingTransaction $transaction, \pocketmine\crafting\CraftingRecipe $recipe, int $repetitions, array $inputs, array $outputs)getInputs()
php
public function getInputs() : arrayReturns a list of items destroyed as ingredients of the recipe.
getOutputs()
php
public function getOutputs() : arrayReturns a list of items created by crafting the recipe.
getPlayer()
php
public function getPlayer() : \pocketmine\player\PlayergetRecipe()
php
public function getRecipe() : \pocketmine\crafting\CraftingRecipeReturns the recipe crafted.
getRepetitions()
php
public function getRepetitions() : intReturns the number of times the recipe was crafted. This is usually 1, but might be more in the case of recipe book shift-clicks (which craft lots of items in a batch).
getTransaction()
php
public function getTransaction() : \pocketmine\inventory\transaction\CraftingTransactionReturns the inventory transaction involved in this crafting event.
