PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
pocketmine\item\enchantment\EnchantingOption Class Reference
+ Collaboration diagram for pocketmine\item\enchantment\EnchantingOption:

Public Member Functions

 __construct (private int $requiredXpLevel, private string $displayName, private array $enchantments)
 
 getDisplayName ()
 
 getEnchantments ()
 
 getRequiredXpLevel ()
 

Detailed Description

Represents an option on the enchanting table menu. If selected, all the enchantments in the option will be applied to the item.

Definition at line 30 of file EnchantingOption.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\item\enchantment\EnchantingOption::__construct ( private int  $requiredXpLevel,
private string  $displayName,
private array  $enchantments 
)
Parameters
EnchantmentInstance[]$enchantments

Definition at line 35 of file EnchantingOption.php.

Member Function Documentation

◆ getDisplayName()

pocketmine\item\enchantment\EnchantingOption::getDisplayName ( )

Returns the name that will be translated to the 'Standard Galactic Alphabet' client-side. This can be any arbitrary text string, since the vanilla client cannot read the text anyway. Example: 'bless creature range free'.

Definition at line 54 of file EnchantingOption.php.

◆ getEnchantments()

pocketmine\item\enchantment\EnchantingOption::getEnchantments ( )

Returns the enchantments that will be applied to the item when this option is clicked.

Returns
EnchantmentInstance[]

Definition at line 63 of file EnchantingOption.php.

◆ getRequiredXpLevel()

pocketmine\item\enchantment\EnchantingOption::getRequiredXpLevel ( )

Returns the minimum amount of XP levels required to select this enchantment option. It's NOT the number of XP levels that will be subtracted after enchanting.

Definition at line 45 of file EnchantingOption.php.


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