Package net.glowstone.inventory
Class GlowMetaEnchantedBook
java.lang.Object
net.glowstone.inventory.GlowMetaItem
net.glowstone.inventory.GlowMetaEnchantedBook
- All Implemented Interfaces:
Cloneable
,org.bukkit.configuration.serialization.ConfigurationSerializable
,org.bukkit.inventory.meta.EnchantmentStorageMeta
,org.bukkit.inventory.meta.ItemMeta
,org.bukkit.persistence.PersistentDataHolder
public class GlowMetaEnchantedBook
extends GlowMetaItem
implements org.bukkit.inventory.meta.EnchantmentStorageMeta
-
Constructor Summary
ConstructorsConstructorDescriptionGlowMetaEnchantedBook
(org.bukkit.inventory.meta.ItemMeta meta) Creates an instance by copying from the givenItemMeta
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addStoredEnchant
(@NotNull org.bukkit.enchantments.Enchantment ench, int level, boolean ignoreLevelRestriction) @NotNull GlowMetaEnchantedBook
clone()
int
getStoredEnchantLevel
(@NotNull org.bukkit.enchantments.Enchantment ench) boolean
hasConflictingStoredEnchant
(@NotNull org.bukkit.enchantments.Enchantment ench) boolean
hasStoredEnchant
(@NotNull org.bukkit.enchantments.Enchantment ench) boolean
boolean
isApplicable
(org.bukkit.Material material) Check whether this ItemMeta can be applied to the given material.boolean
removeStoredEnchant
(@NotNull org.bukkit.enchantments.Enchantment ench) Methods inherited from class net.glowstone.inventory.GlowMetaItem
addAttributeModifier, addEnchant, addItemFlags, displayName, displayName, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, getLoreComponents, getPersistentDataContainer, getPlaceableKeys, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, hasPlaceableKeys, isUnbreakable, lore, lore, readNbtEnchants, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, serializeEnchants, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setLocalizedName, setLore, setLoreComponents, setPlaceableKeys, setUnbreakable, setVersion, toString, writeNbtEnchants
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.inventory.meta.ItemMeta
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, setVersion
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Constructor Details
-
GlowMetaEnchantedBook
public GlowMetaEnchantedBook(org.bukkit.inventory.meta.ItemMeta meta) Creates an instance by copying from the givenItemMeta
. If that item is anotherEnchantmentStorageMeta
, its enchantments are copied; otherwise, the new book has no enchantments.- Parameters:
meta
- theItemMeta
to copy
-
-
Method Details
-
isApplicable
public boolean isApplicable(org.bukkit.Material material) Description copied from class:GlowMetaItem
Check whether this ItemMeta can be applied to the given material.- Overrides:
isApplicable
in classGlowMetaItem
- Parameters:
material
- The Material.- Returns:
- True if this ItemMeta is applicable.
-
serialize
- Specified by:
serialize
in interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable
- Overrides:
serialize
in classGlowMetaItem
-
hasStoredEnchants
public boolean hasStoredEnchants()- Specified by:
hasStoredEnchants
in interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
hasStoredEnchant
public boolean hasStoredEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench) - Specified by:
hasStoredEnchant
in interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
getStoredEnchantLevel
public int getStoredEnchantLevel(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench) - Specified by:
getStoredEnchantLevel
in interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
getStoredEnchants
- Specified by:
getStoredEnchants
in interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
addStoredEnchant
public boolean addStoredEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench, int level, boolean ignoreLevelRestriction) - Specified by:
addStoredEnchant
in interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
removeStoredEnchant
public boolean removeStoredEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench) throws IllegalArgumentException - Specified by:
removeStoredEnchant
in interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
- Throws:
IllegalArgumentException
-
hasConflictingStoredEnchant
public boolean hasConflictingStoredEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench) - Specified by:
hasConflictingStoredEnchant
in interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
clone
- Specified by:
clone
in interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
- Specified by:
clone
in interfaceorg.bukkit.inventory.meta.ItemMeta
- Overrides:
clone
in classGlowMetaItem
-