PocketMine-MP 5.16.1 git-585aee9386a787c95e73dd0a05ffca8329606b68
pocketmine\item\enchantment\EnchantmentInstance Class Reference
+ Collaboration diagram for pocketmine\item\enchantment\EnchantmentInstance:

Public Member Functions

 __construct (private Enchantment $enchantment, private int $level=1)
 
 getLevel ()
 
 getType ()
 

Detailed Description

Container for enchantment data applied to items.

Note: This class is assumed to be immutable. Consider this before making alterations.

Definition at line 31 of file EnchantmentInstance.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\item\enchantment\EnchantmentInstance::__construct ( private Enchantment  $enchantment,
private int  $level = 1 
)

Definition at line 32 of file EnchantmentInstance.php.

Member Function Documentation

◆ getLevel()

pocketmine\item\enchantment\EnchantmentInstance::getLevel ( )

Returns the level of the enchantment.

Definition at line 47 of file EnchantmentInstance.php.

Referenced by pocketmine\network\mcpe\InventoryManager\syncEnchantingTableOptions().

+ Here is the caller graph for this function:

◆ getType()

pocketmine\item\enchantment\EnchantmentInstance::getType ( )

Returns the type of this enchantment.

Definition at line 40 of file EnchantmentInstance.php.

Referenced by pocketmine\network\mcpe\InventoryManager\syncEnchantingTableOptions().

+ Here is the caller graph for this function:

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