|
PocketMine-MP 5.36.1 git-eaa7c4834c8fe2f379d24e7f0ee6cc63cfb18ccc
|
Collaboration diagram for pocketmine\item\enchantment\AvailableEnchantmentRegistry:Public Member Functions | |
| getAll () | |
| getAllEnchantmentsForItem (Item $item) | |
| getPrimaryEnchantmentsForItem (Item $item) | |
| getPrimaryItemTags (Enchantment $enchantment) | |
| getSecondaryItemTags (Enchantment $enchantment) | |
| isAvailableForItem (Enchantment $enchantment, Item $item) | |
| isRegistered (Enchantment $enchantment) | |
| register (Enchantment $enchantment, array $primaryItemTags, array $secondaryItemTags) | |
| setPrimaryItemTags (Enchantment $enchantment, array $tags) | |
| setSecondaryItemTags (Enchantment $enchantment, array $tags) | |
| unregister (Enchantment $enchantment) | |
| unregisterAll () | |
Registry of enchantments that can be applied to items during in-game enchanting (enchanting table, anvil, fishing, etc.).
Definition at line 40 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::getAll | ( | ) |
Definition at line 213 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::getAllEnchantmentsForItem | ( | Item | $item | ) |
Returns all available enchantments compatible with the item.
Warning: not suitable for obtaining enchantments for an enchanting table (use AvailableEnchantmentRegistry::getPrimaryEnchantmentsForItem() for that).
Definition at line 186 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::getPrimaryEnchantmentsForItem | ( | Item | $item | ) |
Returns enchantments that can be applied to the specified item in an enchanting table (primary only).
Definition at line 166 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::getPrimaryItemTags | ( | Enchantment | $enchantment | ) |
Returns primary compatibility tags for the specified enchantment.
An item matching at least one of these tags (or its descendents) can be:
Definition at line 122 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::getSecondaryItemTags | ( | Enchantment | $enchantment | ) |
Returns secondary compatibility tags for the specified enchantment.
An item matching at least one of these tags (or its descendents) can be:
Definition at line 146 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::isAvailableForItem | ( | Enchantment | $enchantment, |
| Item | $item ) |
Returns whether the specified enchantment can be applied to the particular item.
Warning: not suitable for checking the availability of enchantment for an enchanting table.
Definition at line 202 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::isRegistered | ( | Enchantment | $enchantment | ) |
Definition at line 109 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::register | ( | Enchantment | $enchantment, |
| array | $primaryItemTags, | ||
| array | $secondaryItemTags ) |
| string[] | $primaryItemTags | |
| string[] | $secondaryItemTags |
Definition at line 91 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::setPrimaryItemTags | ( | Enchantment | $enchantment, |
| array | $tags ) |
| string[] | $tags |
Definition at line 129 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::setSecondaryItemTags | ( | Enchantment | $enchantment, |
| array | $tags ) |
| string[] | $tags |
Definition at line 153 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::unregister | ( | Enchantment | $enchantment | ) |
Definition at line 97 of file AvailableEnchantmentRegistry.php.
| pocketmine\item\enchantment\AvailableEnchantmentRegistry::unregisterAll | ( | ) |
Definition at line 103 of file AvailableEnchantmentRegistry.php.