Skip to content

StringToItemParser ​

final class · pocketmine\item\StringToItemParser · source

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) : array

Returns a list of currently registered aliases that resolve to the given item.

lookupBlockAliases() ​

php
public function lookupBlockAliases(\pocketmine\block\Block $block) : array

Returns 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) : void

parse() ​

php
public function parse(string $input) : ?\pocketmine\item\Item

register() ​

php
public function register(string $alias, \Closure $callback) : void

registerBlock() ​

php
public function registerBlock(string $alias, \Closure $callback) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.