|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EnchantmentStorageMeta
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.
| Method Summary | |
|---|---|
boolean |
addStoredEnchant(Enchantment ench,
int level,
boolean ignoreLevelRestriction)
Stores the specified enchantment in this item meta. |
EnchantmentStorageMeta |
clone()
|
int |
getStoredEnchantLevel(Enchantment ench)
Checks for the level of the stored enchantment. |
Map<Enchantment,Integer> |
getStoredEnchants()
Gets a copy the stored enchantments in this ItemMeta. |
boolean |
hasStoredEnchant(Enchantment ench)
Checks for storage of the specified enchantment. |
boolean |
hasStoredEnchants()
Checks for the existence of any stored enchantments. |
boolean |
removeStoredEnchant(Enchantment ench)
Remove the specified stored enchantment from this item meta. |
| Methods inherited from interface org.bukkit.inventory.meta.ItemMeta |
|---|
addEnchant, getDisplayName, getEnchantLevel, getEnchants, getLore, hasDisplayName, hasEnchant, hasEnchants, hasLore, removeEnchant, setDisplayName, setLore |
| Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable |
|---|
serialize |
| Method Detail |
|---|
boolean hasStoredEnchants()
boolean hasStoredEnchant(Enchantment ench)
ench - enchantment to check
int getStoredEnchantLevel(Enchantment ench)
ench - enchantment to check
Map<Enchantment,Integer> getStoredEnchants()
boolean addStoredEnchant(Enchantment ench,
int level,
boolean ignoreLevelRestriction)
ench - Enchantment to storelevel - Level for the enchantmentignoreLevelRestriction - this indicates the enchantment should be applied, ignoring the level limit
IllegalArgumentException - if enchantment is null
boolean removeStoredEnchant(Enchantment ench)
throws IllegalArgumentException
ench - Enchantment to remove
IllegalArgumentException - if enchantment is nullEnchantmentStorageMeta clone()
clone in interface ItemMeta
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||