Package valorless.rarespawns.utils
Interface FireworkSpawner
public interface FireworkSpawner
Spawns randomized fireworks for visual effects.
Provides helpers to spawn one or more fireworks with randomized colors, types,
and flags (flicker/trail). Fireworks are scheduled on the server thread using
BukkitRunnable and the plugin instance stored in Main.plugin.
-
Field Summary
Fields -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic org.bukkit.FireworkEffectCreates a random firework effect with random colors, flicker, and trail.static voidspawnRandomFireworksWithDelay(org.bukkit.entity.Entity mob, int count, int delay) Spawns multiple random fireworks with a delay between each.
-
Field Details
-
random
-
-
Method Details
-
spawnRandomFireworksWithDelay
static void spawnRandomFireworksWithDelay(org.bukkit.entity.Entity mob, int count, int delay) Spawns multiple random fireworks with a delay between each.The fireworks spawn at the triggering entity's current location and are configured with a random effect and power. The task stops after spawning the requested count.
- Parameters:
mob- the entity whose location is used for spawningcount- the number of fireworks to spawndelay- the delay between each firework in ticks (20 ticks = 1 second)
-
createRandomFireworkEffect
static org.bukkit.FireworkEffect createRandomFireworkEffect()Creates a random firework effect with random colors, flicker, and trail.- Returns:
- a randomly generated FireworkEffect
-