|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FireworkMeta
Represents a Material.FIREWORK
and its effects.
Method Summary | |
---|---|
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. |
Methods inherited from interface org.bukkit.inventory.meta.ItemMeta |
---|
addEnchant, getDisplayName, getEnchantLevel, getEnchants, getLore, hasConflictingEnchant, hasDisplayName, hasEnchant, hasEnchants, hasLore, removeEnchant, setDisplayName, setLore |
Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable |
---|
serialize |
Method Detail |
---|
void addEffect(FireworkEffect effect) throws IllegalArgumentException
effect
- The firework effect to add
IllegalArgumentException
- If effect is nullvoid addEffects(FireworkEffect... effects) throws IllegalArgumentException
effects
- The firework effects to add
IllegalArgumentException
- If effects is null
IllegalArgumentException
- 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 effects
IllegalArgumentException
- If effects is null
IllegalArgumentException
- 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 remove
IndexOutOfBoundsException
- 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-128
IllegalArgumentException
- if height<0 or height>128FireworkMeta clone()
clone
in interface ItemMeta
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |