Package net.glowstone.inventory
Class GlowMetaFirework
java.lang.Object
net.glowstone.inventory.GlowMetaItem
net.glowstone.inventory.GlowMetaFirework
- All Implemented Interfaces:
Cloneable
,org.bukkit.configuration.serialization.ConfigurationSerializable
,org.bukkit.inventory.meta.BlockDataMeta
,org.bukkit.inventory.meta.Damageable
,org.bukkit.inventory.meta.FireworkMeta
,org.bukkit.inventory.meta.ItemMeta
,org.bukkit.inventory.meta.Repairable
,org.bukkit.persistence.PersistentDataHolder
public class GlowMetaFirework
extends GlowMetaItem
implements org.bukkit.inventory.meta.FireworkMeta
-
Constructor Summary
ConstructorsConstructorDescriptionGlowMetaFirework
(org.bukkit.inventory.meta.ItemMeta meta) Creates an instance by copying from the givenItemMeta
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEffect
(@NotNull org.bukkit.FireworkEffect effect) void
addEffects
(@NotNull Iterable<org.bukkit.FireworkEffect> effects) void
addEffects
(org.bukkit.FireworkEffect... effects) void
@NotNull GlowMetaFirework
clone()
@NotNull List<org.bukkit.FireworkEffect>
int
int
getPower()
boolean
boolean
isApplicable
(org.bukkit.Material material) Check whether this ItemMeta can be applied to the given material.void
removeEffect
(int index) void
setPower
(int power) Methods inherited from class net.glowstone.inventory.GlowMetaItem
addAttributeModifier, addEnchant, addItemFlags, displayName, displayName, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getBlockData, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDamage, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, getLoreComponents, getPersistentDataContainer, getPlaceableKeys, getRepairCost, hasAttributeModifiers, hasBlockData, hasConflictingEnchant, hasCustomModelData, hasDamage, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, hasPlaceableKeys, hasRepairCost, isUnbreakable, lore, lore, readNbtEnchants, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, serializeEnchants, setAttributeModifiers, setBlockData, setCanDestroy, setCanPlaceOn, setCustomModelData, setDamage, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setLocalizedName, setLore, setLoreComponents, setPlaceableKeys, setRepairCost, 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, getAsString, 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
-
GlowMetaFirework
public GlowMetaFirework(org.bukkit.inventory.meta.ItemMeta meta) Creates an instance by copying from the givenItemMeta
. If that item is anotherFireworkMeta
, its effects and power are copied; otherwise, the new firework has no effects and zero power.- 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.
-
clone
- Specified by:
clone
in interfaceorg.bukkit.inventory.meta.Damageable
- Specified by:
clone
in interfaceorg.bukkit.inventory.meta.FireworkMeta
- Specified by:
clone
in interfaceorg.bukkit.inventory.meta.ItemMeta
- Specified by:
clone
in interfaceorg.bukkit.inventory.meta.Repairable
- Overrides:
clone
in classGlowMetaItem
-
serialize
- Specified by:
serialize
in interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable
- Overrides:
serialize
in classGlowMetaItem
-
addEffect
public void addEffect(@NotNull @NotNull org.bukkit.FireworkEffect effect) - Specified by:
addEffect
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
addEffects
public void addEffects(org.bukkit.FireworkEffect... effects) - Specified by:
addEffects
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
addEffects
- Specified by:
addEffects
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
getEffects
- Specified by:
getEffects
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
getEffectsSize
public int getEffectsSize()- Specified by:
getEffectsSize
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
removeEffect
public void removeEffect(int index) - Specified by:
removeEffect
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
clearEffects
public void clearEffects()- Specified by:
clearEffects
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
hasEffects
public boolean hasEffects()- Specified by:
hasEffects
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
setPower
public void setPower(int power) - Specified by:
setPower
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-
getPower
public int getPower()- Specified by:
getPower
in interfaceorg.bukkit.inventory.meta.FireworkMeta
-