Class FireworkBuilder
java.lang.Object
io.rhythmknights.coreapi.modal.builder.item.BaseItemBuilder<FireworkBuilder>
io.rhythmknights.coreapi.modal.builder.item.FireworkBuilder
Item builder for
Material.FIREWORK_ROCKET and Material.FIREWORK_ROCKET only- Since:
- 3.0.1
-
Method Summary
Modifier and TypeMethodDescription@NotNull FireworkBuilderAdd several firework effects to this firework.@NotNull FireworkBuildereffect(@NotNull org.bukkit.FireworkEffect... effects) Add several firework effects to this firework.@NotNull FireworkBuilderpower(int power) Sets the approximate power of the firework.Methods inherited from class io.rhythmknights.coreapi.modal.builder.item.BaseItemBuilder
amount, asModalItem, asModalItem, build, color, deserializeComponent, disenchant, enchant, enchant, enchant, enchant, enchant, flags, getItemStack, getMeta, glow, glow, lore, lore, lore, model, name, pdc, removeNBT, serializeComponent, setItemStack, setMeta, setNBT, setNBT, unbreakable, unbreakable
-
Method Details
-
effect
@NotNull @Contract("_ -> this") public @NotNull FireworkBuilder effect(@NotNull @NotNull org.bukkit.FireworkEffect... effects) Add several firework effects to this firework.- Parameters:
effects- effects to add- Returns:
FireworkBuilder- Throws:
IllegalArgumentException- If effects is nullIllegalArgumentException- If any effect is null (may be thrown after changes have occurred)- Since:
- 3.0.1
-
effect
@NotNull @Contract("_ -> this") public @NotNull FireworkBuilder effect(@NotNull @NotNull List<org.bukkit.FireworkEffect> effects) Add several firework effects to this firework.- Parameters:
effects- effects to add- Returns:
FireworkBuilder- Throws:
IllegalArgumentException- If effects is nullIllegalArgumentException- If any effect is null (may be thrown after changes have occurred)- Since:
- 3.0.1
-
power
Sets 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-128- Returns:
FireworkBuilder- Throws:
IllegalArgumentException- if height<0 or height>128- Since:
- 3.0.1
-