PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
Loading...
Searching...
No Matches
pocketmine\item\enchantment\StringToEnchantmentParser Class Reference
+ Inheritance diagram for pocketmine\item\enchantment\StringToEnchantmentParser:
+ Collaboration diagram for pocketmine\item\enchantment\StringToEnchantmentParser:

Public Member Functions

 getKnownAliases ()
 
 override (string $alias, \Closure $callback)
 
 parse (string $input)
 
 register (string $alias, \Closure $callback)
 
 registerAlias (string $existing, string $alias)
 

Protected Member Functions

 reprocess (string $input)
 

Detailed Description

Handles parsing enchantments from strings. This is used to interpret names in the /enchant command.

@phpstan-extends StringToTParser<Enchantment>

Definition at line 34 of file StringToEnchantmentParser.php.

Member Function Documentation

◆ getKnownAliases()

pocketmine\utils\StringToTParser::getKnownAliases ( )
inherited
Returns
string[]|int[]

Definition at line 94 of file StringToTParser.php.

◆ override()

pocketmine\utils\StringToTParser::override ( string $alias,
\Closure $callback )
inherited

@phpstan-param \Closure(string $input) : T $callback

Definition at line 57 of file StringToTParser.php.

◆ parse()

pocketmine\item\enchantment\StringToEnchantmentParser::parse ( string $input)

Tries to parse the specified string into a corresponding instance of T. @phpstan-return T|null

Reimplemented from pocketmine\utils\StringToTParser.

Definition at line 66 of file StringToEnchantmentParser.php.

◆ register()

pocketmine\utils\StringToTParser::register ( string $alias,
\Closure $callback )
inherited

@phpstan-param \Closure(string $input) : T $callback

Reimplemented in pocketmine\item\StringToItemParser.

Definition at line 48 of file StringToTParser.php.

◆ registerAlias()

pocketmine\utils\StringToTParser::registerAlias ( string $existing,
string $alias )
inherited

Registers a new alias for an existing known alias.

Definition at line 64 of file StringToTParser.php.

◆ reprocess()

pocketmine\utils\StringToTParser::reprocess ( string $input)
protectedinherited

Definition at line 89 of file StringToTParser.php.


The documentation for this class was generated from the following file: