Class GlowMetaItem

java.lang.Object
net.glowstone.inventory.GlowMetaItem
All Implemented Interfaces:
Cloneable, org.bukkit.configuration.serialization.ConfigurationSerializable, org.bukkit.inventory.meta.ItemMeta, org.bukkit.persistence.PersistentDataHolder
Direct Known Subclasses:
GlowMetaBanner, GlowMetaEnchantedBook, GlowMetaFirework, GlowMetaFireworkEffect, GlowMetaKnowledgeBook, GlowMetaLeatherArmor, GlowMetaPotion, GlowMetaSkull, GlowMetaSpawn

public class GlowMetaItem extends Object implements org.bukkit.inventory.meta.ItemMeta
An implementation of ItemMeta, created through GlowItemFactory.
  • Constructor Details

    • GlowMetaItem

      public GlowMetaItem(org.bukkit.inventory.meta.ItemMeta meta)
      Create a GlowMetaItem, copying from another if possible.
      Parameters:
      meta - The meta to copy from, or null.
  • Method Details

    • serializeEnchants

      protected static void serializeEnchants(String name, Map<String,Object> map, Map<org.bukkit.enchantments.Enchantment,Integer> enchants)
    • writeNbtEnchants

      protected static void writeNbtEnchants(String name, CompoundTag to, Map<org.bukkit.enchantments.Enchantment,Integer> enchants)
    • readNbtEnchants

      protected static Map<org.bukkit.enchantments.Enchantment,Integer> readNbtEnchants(String name, CompoundTag tag)
    • isApplicable

      public boolean isApplicable(org.bukkit.Material material)
      Check whether this ItemMeta can be applied to the given material.
      Parameters:
      material - The Material.
      Returns:
      True if this ItemMeta is applicable.
    • getCanDestroy

      public Set<org.bukkit.Material> getCanDestroy()
      Specified by:
      getCanDestroy in interface org.bukkit.inventory.meta.ItemMeta
    • setCanDestroy

      public void setCanDestroy(Set<org.bukkit.Material> canDestroy)
      Specified by:
      setCanDestroy in interface org.bukkit.inventory.meta.ItemMeta
    • getCanPlaceOn

      public Set<org.bukkit.Material> getCanPlaceOn()
      Specified by:
      getCanPlaceOn in interface org.bukkit.inventory.meta.ItemMeta
    • setCanPlaceOn

      public void setCanPlaceOn(Set<org.bukkit.Material> canPlaceOn)
      Specified by:
      setCanPlaceOn in interface org.bukkit.inventory.meta.ItemMeta
    • getDestroyableKeys

      @NotNull public @NotNull Set<com.destroystokyo.paper.Namespaced> getDestroyableKeys()
      Specified by:
      getDestroyableKeys in interface org.bukkit.inventory.meta.ItemMeta
    • setDestroyableKeys

      public void setDestroyableKeys(@NotNull @NotNull Collection<com.destroystokyo.paper.Namespaced> canDestroy)
      Specified by:
      setDestroyableKeys in interface org.bukkit.inventory.meta.ItemMeta
    • getPlaceableKeys

      @NotNull public @NotNull Set<com.destroystokyo.paper.Namespaced> getPlaceableKeys()
      Specified by:
      getPlaceableKeys in interface org.bukkit.inventory.meta.ItemMeta
    • setPlaceableKeys

      public void setPlaceableKeys(@NotNull @NotNull Collection<com.destroystokyo.paper.Namespaced> canPlaceOn)
      Specified by:
      setPlaceableKeys in interface org.bukkit.inventory.meta.ItemMeta
    • hasPlaceableKeys

      public boolean hasPlaceableKeys()
      Specified by:
      hasPlaceableKeys in interface org.bukkit.inventory.meta.ItemMeta
    • hasDestroyableKeys

      public boolean hasDestroyableKeys()
      Specified by:
      hasDestroyableKeys in interface org.bukkit.inventory.meta.ItemMeta
    • serialize

      @NotNull public @NotNull Map<String,Object> serialize()
      Specified by:
      serialize in interface org.bukkit.configuration.serialization.ConfigurationSerializable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hasDisplayName

      public boolean hasDisplayName()
      Specified by:
      hasDisplayName in interface org.bukkit.inventory.meta.ItemMeta
    • displayName

      @Nullable public @Nullable net.kyori.adventure.text.Component displayName()
      Specified by:
      displayName in interface org.bukkit.inventory.meta.ItemMeta
    • displayName

      public void displayName(@Nullable @Nullable net.kyori.adventure.text.Component component)
      Specified by:
      displayName in interface org.bukkit.inventory.meta.ItemMeta
    • getDisplayNameComponent

      @NotNull public @NotNull net.md_5.bungee.api.chat.BaseComponent[] getDisplayNameComponent()
      Specified by:
      getDisplayNameComponent in interface org.bukkit.inventory.meta.ItemMeta
    • setDisplayNameComponent

      public void setDisplayNameComponent(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] baseComponents)
      Specified by:
      setDisplayNameComponent in interface org.bukkit.inventory.meta.ItemMeta
    • hasLocalizedName

      public boolean hasLocalizedName()
      Specified by:
      hasLocalizedName in interface org.bukkit.inventory.meta.ItemMeta
    • getLocalizedName

      @NotNull public @NotNull String getLocalizedName()
      Specified by:
      getLocalizedName in interface org.bukkit.inventory.meta.ItemMeta
    • setLocalizedName

      public void setLocalizedName(String name)
      Specified by:
      setLocalizedName in interface org.bukkit.inventory.meta.ItemMeta
    • hasLore

      public boolean hasLore()
      Specified by:
      hasLore in interface org.bukkit.inventory.meta.ItemMeta
    • lore

      @Nullable public @Nullable List<net.kyori.adventure.text.Component> lore()
      Specified by:
      lore in interface org.bukkit.inventory.meta.ItemMeta
    • lore

      public void lore(@Nullable @Nullable List<net.kyori.adventure.text.Component> list)
      Specified by:
      lore in interface org.bukkit.inventory.meta.ItemMeta
    • getLore

      public List<String> getLore()
      Specified by:
      getLore in interface org.bukkit.inventory.meta.ItemMeta
    • getLoreComponents

      @Nullable public @Nullable List<net.md_5.bungee.api.chat.BaseComponent[]> getLoreComponents()
      Specified by:
      getLoreComponents in interface org.bukkit.inventory.meta.ItemMeta
    • setLore

      public void setLore(List<String> lore)
      Specified by:
      setLore in interface org.bukkit.inventory.meta.ItemMeta
    • setLoreComponents

      public void setLoreComponents(@Nullable @Nullable List<net.md_5.bungee.api.chat.BaseComponent[]> list)
      Specified by:
      setLoreComponents in interface org.bukkit.inventory.meta.ItemMeta
    • hasCustomModelData

      public boolean hasCustomModelData()
      Specified by:
      hasCustomModelData in interface org.bukkit.inventory.meta.ItemMeta
    • getCustomModelData

      public int getCustomModelData()
      Specified by:
      getCustomModelData in interface org.bukkit.inventory.meta.ItemMeta
    • setCustomModelData

      public void setCustomModelData(@Nullable @Nullable Integer integer)
      Specified by:
      setCustomModelData in interface org.bukkit.inventory.meta.ItemMeta
    • hasEnchants

      public boolean hasEnchants()
      Specified by:
      hasEnchants in interface org.bukkit.inventory.meta.ItemMeta
    • hasEnchant

      public boolean hasEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench)
      Specified by:
      hasEnchant in interface org.bukkit.inventory.meta.ItemMeta
    • getEnchantLevel

      public int getEnchantLevel(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench)
      Specified by:
      getEnchantLevel in interface org.bukkit.inventory.meta.ItemMeta
    • getEnchants

      @NotNull public @NotNull Map<org.bukkit.enchantments.Enchantment,Integer> getEnchants()
      Specified by:
      getEnchants in interface org.bukkit.inventory.meta.ItemMeta
    • addEnchant

      public boolean addEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench, int level, boolean ignoreLevelRestriction)
      Specified by:
      addEnchant in interface org.bukkit.inventory.meta.ItemMeta
    • removeEnchant

      public boolean removeEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench)
      Specified by:
      removeEnchant in interface org.bukkit.inventory.meta.ItemMeta
    • hasConflictingEnchant

      public boolean hasConflictingEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench)
      Specified by:
      hasConflictingEnchant in interface org.bukkit.inventory.meta.ItemMeta
    • clone

      @NotNull public @NotNull org.bukkit.inventory.meta.ItemMeta clone()
      Specified by:
      clone in interface org.bukkit.inventory.meta.ItemMeta
      Overrides:
      clone in class Object
    • addItemFlags

      public void addItemFlags(org.bukkit.inventory.ItemFlag... itemFlags)
      Specified by:
      addItemFlags in interface org.bukkit.inventory.meta.ItemMeta
    • removeItemFlags

      public void removeItemFlags(org.bukkit.inventory.ItemFlag... itemFlags)
      Specified by:
      removeItemFlags in interface org.bukkit.inventory.meta.ItemMeta
    • getItemFlags

      @NotNull public @NotNull Set<org.bukkit.inventory.ItemFlag> getItemFlags()
      Specified by:
      getItemFlags in interface org.bukkit.inventory.meta.ItemMeta
    • hasItemFlag

      public boolean hasItemFlag(@NotNull @NotNull org.bukkit.inventory.ItemFlag itemFlag)
      Specified by:
      hasItemFlag in interface org.bukkit.inventory.meta.ItemMeta
    • hasAttributeModifiers

      public boolean hasAttributeModifiers()
      Specified by:
      hasAttributeModifiers in interface org.bukkit.inventory.meta.ItemMeta
    • getAttributeModifiers

      @Nullable public @Nullable com.google.common.collect.Multimap<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> getAttributeModifiers()
      Specified by:
      getAttributeModifiers in interface org.bukkit.inventory.meta.ItemMeta
    • getAttributeModifiers

      @NotNull public @NotNull com.google.common.collect.Multimap<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> getAttributeModifiers(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot)
      Specified by:
      getAttributeModifiers in interface org.bukkit.inventory.meta.ItemMeta
    • getAttributeModifiers

      @Nullable public @Nullable Collection<org.bukkit.attribute.AttributeModifier> getAttributeModifiers(@NotNull @NotNull org.bukkit.attribute.Attribute attribute)
      Specified by:
      getAttributeModifiers in interface org.bukkit.inventory.meta.ItemMeta
    • addAttributeModifier

      public boolean addAttributeModifier(@NotNull @NotNull org.bukkit.attribute.Attribute attribute, @NotNull @NotNull org.bukkit.attribute.AttributeModifier modifier)
      Specified by:
      addAttributeModifier in interface org.bukkit.inventory.meta.ItemMeta
    • setAttributeModifiers

      public void setAttributeModifiers(@Nullable @Nullable com.google.common.collect.Multimap<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> attributeModifiers)
      Specified by:
      setAttributeModifiers in interface org.bukkit.inventory.meta.ItemMeta
    • removeAttributeModifier

      public boolean removeAttributeModifier(@NotNull @NotNull org.bukkit.attribute.Attribute attribute)
      Specified by:
      removeAttributeModifier in interface org.bukkit.inventory.meta.ItemMeta
    • removeAttributeModifier

      public boolean removeAttributeModifier(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot)
      Specified by:
      removeAttributeModifier in interface org.bukkit.inventory.meta.ItemMeta
    • removeAttributeModifier

      public boolean removeAttributeModifier(@NotNull @NotNull org.bukkit.attribute.Attribute attribute, @NotNull @NotNull org.bukkit.attribute.AttributeModifier modifier)
      Specified by:
      removeAttributeModifier in interface org.bukkit.inventory.meta.ItemMeta
    • getCustomTagContainer

      @NotNull public @NotNull org.bukkit.inventory.meta.tags.CustomItemTagContainer getCustomTagContainer()
      Specified by:
      getCustomTagContainer in interface org.bukkit.inventory.meta.ItemMeta
    • setVersion

      public void setVersion(int version)
      Specified by:
      setVersion in interface org.bukkit.inventory.meta.ItemMeta
    • getPersistentDataContainer

      @NotNull public @NotNull org.bukkit.persistence.PersistentDataContainer getPersistentDataContainer()
      Specified by:
      getPersistentDataContainer in interface org.bukkit.persistence.PersistentDataHolder
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface org.bukkit.inventory.meta.ItemMeta
    • setDisplayName

      public void setDisplayName(String displayName)
      Specified by:
      setDisplayName in interface org.bukkit.inventory.meta.ItemMeta
    • isUnbreakable

      public boolean isUnbreakable()
      Specified by:
      isUnbreakable in interface org.bukkit.inventory.meta.ItemMeta
    • setUnbreakable

      public void setUnbreakable(boolean unbreakable)
      Specified by:
      setUnbreakable in interface org.bukkit.inventory.meta.ItemMeta