public interface FireworkMeta extends ItemMeta
Material.FIREWORK_ROCKET
and its effects.Modifier and Type | Method and Description |
---|---|
void |
addEffect(@NotNull FireworkEffect effect)
Add another effect to this firework.
|
void |
addEffects(FireworkEffect... effects)
Add several effects to this firework.
|
void |
addEffects(@NotNull Iterable<FireworkEffect> effects)
Add several firework effects to this firework.
|
void |
clearEffects()
Remove all effects from this firework.
|
@NotNull FireworkMeta |
clone() |
@NotNull 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.
|
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
serialize
getPersistentDataContainer
void addEffect(@NotNull @NotNull FireworkEffect effect) throws IllegalArgumentException
effect
- The firework effect to addIllegalArgumentException
- If effect is nullvoid addEffects(@NotNull 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(@NotNull @NotNull 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)@NotNull @NotNull 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>128@NotNull @NotNull FireworkMeta clone()
Copyright © 2021. All rights reserved.