public interface FireworkMeta extends ItemMeta
Material.FIREWORK
and its effects.Modifier and Type | Method and Description |
---|---|
void |
addEffect(FireworkEffect effect)
Add another effect to this firework.
|
void |
addEffects(FireworkEffect... effects)
Add several effects to this firework.
|
void |
addEffects(Iterable<FireworkEffect> effects)
Add several firework effects to this firework.
|
void |
clearEffects()
Remove all effects from this firework.
|
FireworkMeta |
clone() |
List<FireworkEffect> |
getEffects()
Get the effects in this firework.
|
int |
getEffectsSize()
Get the number of effects in this firework.
|
int |
getPower()
Gets the approximate height the firework will fly.
|
boolean |
hasEffects()
Get whether this firework has any effects.
|
void |
removeEffect(int index)
Remove an effect from this firework.
|
void |
setPower(int power)
Sets the approximate power of the firework.
|
addEnchant, getDisplayName, getEnchantLevel, getEnchants, getLore, hasConflictingEnchant, hasDisplayName, hasEnchant, hasEnchants, hasLore, removeEnchant, setDisplayName, setLore
serialize
void addEffect(FireworkEffect effect) throws IllegalArgumentException
effect
- The firework effect to addIllegalArgumentException
- If effect is nullvoid addEffects(FireworkEffect... effects) throws IllegalArgumentException
effects
- The firework effects to addIllegalArgumentException
- If effects is nullIllegalArgumentException
- If any effect is null (may be thrown
after changes have occurred)void addEffects(Iterable<FireworkEffect> effects) throws IllegalArgumentException
effects
- An iterable object whose iterator yields the desired
firework effectsIllegalArgumentException
- If effects is nullIllegalArgumentException
- If any effect is null (may be thrown
after changes have occurred)List<FireworkEffect> getEffects()
int getEffectsSize()
void removeEffect(int index) throws IndexOutOfBoundsException
index
- The index of the effect to removeIndexOutOfBoundsException
- If index < 0 or index > getEffectsSize()
void clearEffects()
boolean hasEffects()
int getPower()
void setPower(int power) throws IllegalArgumentException
power
- the power of the firework, from 0-128IllegalArgumentException
- if height<0 or height>128FireworkMeta clone()
Copyright © 2015. All rights reserved.