EnchantmentMeta is specific to items that can store enchantments, as opposed to being enchanted. Material#ENCHANTED_BOOK is an example of an item with enchantment storage.
Definition at line 13 of file EnchantmentStorageMeta.java.
boolean org.bukkit.inventory.meta.EnchantmentStorageMeta.addStoredEnchant |
( |
Enchantment |
ench, |
|
|
int |
level, |
|
|
boolean |
ignoreLevelRestriction |
|
) |
| |
Stores the specified enchantment in this item meta.
- Parameters
-
ench | Enchantment to store |
level | Level for the enchantment |
ignoreLevelRestriction | this indicates the enchantment should be applied, ignoring the level limit |
- Returns
- true if the item meta changed as a result of this call, false otherwise
- Exceptions
-
IllegalArgumentException | if enchantment is null |
int org.bukkit.inventory.meta.EnchantmentStorageMeta.getStoredEnchantLevel |
( |
Enchantment |
ench | ) |
|
Checks for the level of the stored enchantment.
- Parameters
-
- Returns
- The level that the specified stored enchantment has, or 0 if none
Map<Enchantment, Integer> org.bukkit.inventory.meta.EnchantmentStorageMeta.getStoredEnchants |
( |
| ) |
|
Gets a copy the stored enchantments in this ItemMeta.
- Returns
- An immutable copy of the stored enchantments
boolean org.bukkit.inventory.meta.EnchantmentStorageMeta.hasConflictingStoredEnchant |
( |
Enchantment |
ench | ) |
|
Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.
- Parameters
-
- Returns
- true if the enchantment conflicts, false otherwise
boolean org.bukkit.inventory.meta.EnchantmentStorageMeta.hasStoredEnchant |
( |
Enchantment |
ench | ) |
|
Checks for storage of the specified enchantment.
- Parameters
-
- Returns
- true if this enchantment is stored in this meta
boolean org.bukkit.inventory.meta.EnchantmentStorageMeta.hasStoredEnchants |
( |
| ) |
|
Checks for the existence of any stored enchantments.
- Returns
- true if an enchantment exists on this meta
boolean org.bukkit.inventory.meta.EnchantmentStorageMeta.removeStoredEnchant |
( |
Enchantment |
ench | ) |
throws IllegalArgumentException |
Remove the specified stored enchantment from this item meta.
- Parameters
-
ench | Enchantment to remove |
- Returns
- true if the item meta changed as a result of this call, false otherwise
- Exceptions
-
IllegalArgumentException | if enchantment is null |
The documentation for this interface was generated from the following file: