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

Public Member Functions

 areCompatible (Enchantment $first, Enchantment $second)
 
 register (string $tag, array $enchantments)
 
 unregister (string $tag, array $enchantments)
 
 unregisterAll (string $tag)
 

Detailed Description

Manages which enchantments are incompatible with each other. Enchantments can be added to groups to make them incompatible with all other enchantments already in that group.

Definition at line 37 of file IncompatibleEnchantmentRegistry.php.

Member Function Documentation

◆ areCompatible()

pocketmine\item\enchantment\IncompatibleEnchantmentRegistry::areCompatible ( Enchantment $first,
Enchantment $second )

Returns whether two enchantments can be applied to the same item.

Definition at line 89 of file IncompatibleEnchantmentRegistry.php.

◆ register()

pocketmine\item\enchantment\IncompatibleEnchantmentRegistry::register ( string $tag,
array $enchantments )

Register incompatibility for an enchantment group.

All enchantments belonging to the same group are incompatible with each other, i.e. they cannot be added together on the same item.

Parameters
Enchantment[]$enchantments

Definition at line 60 of file IncompatibleEnchantmentRegistry.php.

◆ unregister()

pocketmine\item\enchantment\IncompatibleEnchantmentRegistry::unregister ( string $tag,
array $enchantments )

Unregister incompatibility for some enchantments of a particular group.

Parameters
Enchantment[]$enchantments

Definition at line 71 of file IncompatibleEnchantmentRegistry.php.

◆ unregisterAll()

pocketmine\item\enchantment\IncompatibleEnchantmentRegistry::unregisterAll ( string $tag)

Unregister incompatibility for all enchantments of a particular group.

Definition at line 80 of file IncompatibleEnchantmentRegistry.php.


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