|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ItemMeta
This type represents the storage mechanism for auxiliary item data.
An implementation will handle the creation and application for ItemMeta. This class should not be implemented by a plugin in a live environment.
Method Summary | |
---|---|
boolean |
addEnchant(Enchantment ench,
int level,
boolean ignoreLevelRestriction)
Adds the specified enchantment to this item meta. |
ItemMeta |
clone()
|
String |
getDisplayName()
Gets the display name that is set. |
int |
getEnchantLevel(Enchantment ench)
Checks for the level of the specified enchantment. |
Map<Enchantment,Integer> |
getEnchants()
Returns a copy the enchantments in this ItemMeta. Returns an empty map if none. |
List<String> |
getLore()
Gets the lore that is set. |
boolean |
hasConflictingEnchant(Enchantment ench)
Checks if the specified enchantment conflicts with any enchantments in this ItemMeta. |
boolean |
hasDisplayName()
Checks for existence of a display name. |
boolean |
hasEnchant(Enchantment ench)
Checks for existence of the specified enchantment. |
boolean |
hasEnchants()
Checks for the existence of any enchantments. |
boolean |
hasLore()
Checks for existence of lore. |
boolean |
removeEnchant(Enchantment ench)
Removes the specified enchantment from this item meta. |
void |
setDisplayName(String name)
Sets the display name. |
void |
setLore(List<String> lore)
Sets the lore for this item. |
Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable |
---|
serialize |
Method Detail |
---|
boolean hasDisplayName()
String getDisplayName()
Plugins should check that hasDisplayName() returns true
before calling this method.
void setDisplayName(String name)
name
- the name to setboolean hasLore()
List<String> getLore()
Plugins should check if hasLore() returns true
before
calling this method.
void setLore(List<String> lore)
lore
- the lore that will be setboolean hasEnchants()
boolean hasEnchant(Enchantment ench)
ench
- enchantment to check
int getEnchantLevel(Enchantment ench)
ench
- enchantment to check
Map<Enchantment,Integer> getEnchants()
boolean addEnchant(Enchantment ench, int level, boolean ignoreLevelRestriction)
ench
- Enchantment to addlevel
- Level for the enchantmentignoreLevelRestriction
- this indicates the enchantment should be
applied, ignoring the level limit
boolean removeEnchant(Enchantment ench)
ench
- Enchantment to remove
boolean hasConflictingEnchant(Enchantment ench)
ench
- enchantment to test
ItemMeta clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |