Package org.bukkit.inventory.meta
Interface FireworkMeta
- All Superinterfaces:
- Cloneable,- ConfigurationSerializable,- ItemMeta,- PersistentDataHolder
Represents a 
Material.FIREWORK_ROCKET and its effects.- 
Method SummaryModifier and TypeMethodDescriptionvoidaddEffect(FireworkEffect effect) Add another effect to this firework.voidaddEffects(Iterable<FireworkEffect> effects) Add several firework effects to this firework.voidaddEffects(FireworkEffect... effects) Add several effects to this firework.voidRemove all effects from this firework.clone()Get the effects in this firework.intGet the number of effects in this firework.intgetPower()Gets the approximate height the firework will fly.booleanGet whether this firework has any effects.voidremoveEffect(int index) Remove an effect from this firework.voidsetPower(int power) Sets the approximate power of the firework.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializableserializeMethods inherited from interface org.bukkit.inventory.meta.ItemMetaaddAttributeModifier, addEnchant, addItemFlags, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setLocalizedName, setLore, setUnbreakable, setVersionMethods inherited from interface org.bukkit.persistence.PersistentDataHoldergetPersistentDataContainer
- 
Method Details- 
addEffectAdd another effect to this firework.- Parameters:
- effect- The firework effect to add
- Throws:
- IllegalArgumentException- If effect is null
 
- 
addEffectsAdd several effects to this firework.- Parameters:
- effects- The firework effects to add
- Throws:
- IllegalArgumentException- If effects is null
- IllegalArgumentException- If any effect is null (may be thrown after changes have occurred)
 
- 
addEffectsAdd several firework effects to this firework.- Parameters:
- effects- An iterable object whose iterator yields the desired firework effects
- Throws:
- IllegalArgumentException- If effects is null
- IllegalArgumentException- If any effect is null (may be thrown after changes have occurred)
 
- 
getEffectsGet the effects in this firework.- Returns:
- An immutable list of the firework effects
 
- 
getEffectsSizeint getEffectsSize()Get the number of effects in this firework.- Returns:
- The number of effects
 
- 
removeEffectRemove an effect from this firework.- Parameters:
- index- The index of the effect to remove
- Throws:
- IndexOutOfBoundsException- If index < 0 or index >- getEffectsSize()
 
- 
clearEffectsvoid clearEffects()Remove all effects from this firework.
- 
hasEffectsboolean hasEffects()Get whether this firework has any effects.- Returns:
- true if it has effects, false if there are no effects
 
- 
getPowerint getPower()Gets the approximate height the firework will fly.- Returns:
- approximate flight height of the firework.
 
- 
setPowerSets the approximate power of the firework. Each level of power is half a second of flight time.- Parameters:
- power- the power of the firework, from 0-127
- Throws:
- IllegalArgumentException- if height<0 or height>127
 
- 
clone
 
-