StringToItemParser
Extends StringToTParser
Handles parsing items from strings. This is used to interpret names from the /give command (and others).
Methods
lookupAliases()
php
public function lookupAliases(\pocketmine\item\Item $item) : arrayReturns a list of currently registered aliases that resolve to the given item.
lookupBlockAliases()
php
public function lookupBlockAliases(\pocketmine\block\Block $block) : arrayReturns a list of currently registered aliases that resolve to the item form of the given block.
override()
php
public function override(string $alias, \Closure $callback) : voidparse()
php
public function parse(string $input) : ?\pocketmine\item\Itemregister()
php
public function register(string $alias, \Closure $callback) : voidregisterBlock()
php
public function registerBlock(string $alias, \Closure $callback) : void