Class FireworkEffectBuilder
java.lang.Object
io.github.lucfr1746.llibrary.itemstack.helper.FireworkEffectBuilder
A builder class for creating custom
FireworkEffect
.
Supports method chaining for easy configuration of effects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.FireworkEffect
build()
Builds and returns the configuredFireworkEffect
.withColor
(@NotNull org.bukkit.Color... colors) Adds one or more primary colors to the firework effect.withFade
(@NotNull org.bukkit.Color... colors) Adds one or more fade colors to the firework effect.Adds flicker to the firework effect.Adds trail to the firework effect.withType
(@NotNull org.bukkit.FireworkEffect.Type type) Sets the type of the firework effect.
-
Constructor Details
-
FireworkEffectBuilder
public FireworkEffectBuilder()Constructs a newFireworkEffectBuilder
.
-
-
Method Details
-
withType
Sets the type of the firework effect.- Parameters:
type
- the firework effect type- Returns:
- this builder instance
-
withColor
Adds one or more primary colors to the firework effect.- Parameters:
colors
- the primary colors- Returns:
- this builder instance
-
withFade
Adds one or more fade colors to the firework effect.- Parameters:
colors
- the fade colors- Returns:
- this builder instance
-
withFlicker
Adds flicker to the firework effect.- Returns:
- this builder instance
-
withTrail
Adds trail to the firework effect.- Returns:
- this builder instance
-
build
public org.bukkit.FireworkEffect build()Builds and returns the configuredFireworkEffect
.- Returns:
- the built firework effect
-