Class FireworkEffectBuilder

java.lang.Object
io.github.lucfr1746.llibrary.itemstack.helper.FireworkEffectBuilder

public class FireworkEffectBuilder extends Object
A builder class for creating custom FireworkEffect. Supports method chaining for easy configuration of effects.
  • Constructor Details

    • FireworkEffectBuilder

      public FireworkEffectBuilder()
      Constructs a new FireworkEffectBuilder.
  • Method Details

    • withType

      public FireworkEffectBuilder withType(@NotNull @NotNull org.bukkit.FireworkEffect.Type type)
      Sets the type of the firework effect.
      Parameters:
      type - the firework effect type
      Returns:
      this builder instance
    • withColor

      public FireworkEffectBuilder withColor(@NotNull @NotNull org.bukkit.Color... colors)
      Adds one or more primary colors to the firework effect.
      Parameters:
      colors - the primary colors
      Returns:
      this builder instance
    • withFade

      public FireworkEffectBuilder withFade(@NotNull @NotNull org.bukkit.Color... colors)
      Adds one or more fade colors to the firework effect.
      Parameters:
      colors - the fade colors
      Returns:
      this builder instance
    • withFlicker

      public FireworkEffectBuilder withFlicker()
      Adds flicker to the firework effect.
      Returns:
      this builder instance
    • withTrail

      public FireworkEffectBuilder withTrail()
      Adds trail to the firework effect.
      Returns:
      this builder instance
    • build

      public org.bukkit.FireworkEffect build()
      Builds and returns the configured FireworkEffect.
      Returns:
      the built firework effect