Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.inventory.meta.EnchantmentStorageMeta Interface Reference
Inheritance diagram for org.bukkit.inventory.meta.EnchantmentStorageMeta:
org.bukkit.inventory.meta.ItemMeta org.bukkit.configuration.serialization.ConfigurationSerializable

Public Member Functions

boolean hasStoredEnchants ()
 
boolean hasStoredEnchant (Enchantment ench)
 
int getStoredEnchantLevel (Enchantment ench)
 
Map< Enchantment, Integer > getStoredEnchants ()
 
boolean addStoredEnchant (Enchantment ench, int level, boolean ignoreLevelRestriction)
 
boolean removeStoredEnchant (Enchantment ench) throws IllegalArgumentException
 
boolean hasConflictingStoredEnchant (Enchantment ench)
 
EnchantmentStorageMeta clone ()
 
- Public Member Functions inherited from org.bukkit.inventory.meta.ItemMeta
boolean hasDisplayName ()
 
String getDisplayName ()
 
void setDisplayName (String name)
 
boolean hasLore ()
 
List< String > getLore ()
 
void setLore (List< String > lore)
 
boolean hasEnchants ()
 
boolean hasEnchant (Enchantment ench)
 
int getEnchantLevel (Enchantment ench)
 
Map< Enchantment, Integer > getEnchants ()
 
boolean addEnchant (Enchantment ench, int level, boolean ignoreLevelRestriction)
 
boolean removeEnchant (Enchantment ench)
 
boolean hasConflictingEnchant (Enchantment ench)
 
- Public Member Functions inherited from org.bukkit.configuration.serialization.ConfigurationSerializable
Map< String, Object > serialize ()
 

Detailed Description

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.

Member Function Documentation

boolean org.bukkit.inventory.meta.EnchantmentStorageMeta.addStoredEnchant ( Enchantment  ench,
int  level,
boolean  ignoreLevelRestriction 
)

Stores the specified enchantment in this item meta.

Parameters
enchEnchantment to store
levelLevel for the enchantment
ignoreLevelRestrictionthis 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
IllegalArgumentExceptionif enchantment is null
int org.bukkit.inventory.meta.EnchantmentStorageMeta.getStoredEnchantLevel ( Enchantment  ench)

Checks for the level of the stored enchantment.

Parameters
enchenchantment to check
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
enchenchantment to test
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
enchenchantment to check
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
enchEnchantment to remove
Returns
true if the item meta changed as a result of this call, false otherwise
Exceptions
IllegalArgumentExceptionif enchantment is null

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