StringToTParser
Handles parsing any Minecraft thing from strings. This can be used, for example, to implement a user-friendly item parser to be used by the /give command (and others). Custom aliases may be registered. Note that the aliases should be user-friendly, i.e. easily readable and writable.
Methods
getKnownAliases()
php
public function getKnownAliases() : arrayoverride()
php
public function override(string $alias, \Closure $callback) : voidparse()
php
public function parse(string $input)Tries to parse the specified string into a corresponding instance of T.
register()
php
public function register(string $alias, \Closure $callback) : voidregisterAlias()
php
public function registerAlias(string $existing, string $alias) : voidRegisters a new alias for an existing known alias.
reprocess() protected
php
protected function reprocess(string $input) : string