Class FireworkBuilder

java.lang.Object
io.rhythmknights.coreapi.modal.builder.item.BaseItemBuilder<FireworkBuilder>
io.rhythmknights.coreapi.modal.builder.item.FireworkBuilder

public class FireworkBuilder extends BaseItemBuilder<FireworkBuilder>
Item builder for Material.FIREWORK_ROCKET and Material.FIREWORK_ROCKET only
Since:
3.0.1
  • 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 null
      IllegalArgumentException - 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 null
      IllegalArgumentException - If any effect is null (may be thrown after changes have occurred)
      Since:
      3.0.1
    • power

      @NotNull @Contract("_ -> this") public @NotNull FireworkBuilder power(int 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