public interface EnchantmentStorageMeta extends ItemMeta
Material.ENCHANTED_BOOK is an example
 of an item with enchantment storage.| Modifier and Type | Method and Description | 
|---|---|
boolean | 
addStoredEnchant(@NotNull Enchantment ench,
                int level,
                boolean ignoreLevelRestriction)
Stores the specified enchantment in this item meta. 
 | 
@NotNull EnchantmentStorageMeta | 
clone()  | 
int | 
getStoredEnchantLevel(@NotNull Enchantment ench)
Checks for the level of the stored enchantment. 
 | 
@NotNull Map<Enchantment,Integer> | 
getStoredEnchants()
Gets a copy the stored enchantments in this ItemMeta. 
 | 
boolean | 
hasConflictingStoredEnchant(@NotNull Enchantment ench)
Checks if the specified enchantment conflicts with any enchantments in
 this ItemMeta. 
 | 
boolean | 
hasStoredEnchant(@NotNull Enchantment ench)
Checks for storage of the specified enchantment. 
 | 
boolean | 
hasStoredEnchants()
Checks for the existence of any stored enchantments. 
 | 
boolean | 
removeStoredEnchant(@NotNull Enchantment ench)
Remove the specified stored enchantment from this item meta. 
 | 
addAttributeModifier, addEnchant, addItemFlags, displayName, displayName, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, getLoreComponents, getPlaceableKeys, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, hasPlaceableKeys, isUnbreakable, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setLocalizedName, setLore, setLoreComponents, setPlaceableKeys, setUnbreakable, setVersionserializegetPersistentDataContainerboolean hasStoredEnchants()
boolean hasStoredEnchant(@NotNull @NotNull Enchantment ench)
ench - enchantment to checkint getStoredEnchantLevel(@NotNull @NotNull Enchantment ench)
ench - enchantment to check@NotNull @NotNull Map<Enchantment,Integer> getStoredEnchants()
boolean addStoredEnchant(@NotNull @NotNull Enchantment ench, int level, boolean ignoreLevelRestriction)
ench - Enchantment to storelevel - Level for the enchantmentignoreLevelRestriction - this indicates the enchantment should be
     applied, ignoring the level limitIllegalArgumentException - if enchantment is nullboolean removeStoredEnchant(@NotNull @NotNull Enchantment ench) throws IllegalArgumentException
ench - Enchantment to removeIllegalArgumentException - if enchantment is nullboolean hasConflictingStoredEnchant(@NotNull @NotNull Enchantment ench)
ench - enchantment to test@NotNull @NotNull EnchantmentStorageMeta clone()
Copyright © 2022. All rights reserved.