Package valorless.rarespawns.utils
Class FireworkSpawner
java.lang.Object
valorless.rarespawns.utils.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.
-
Constructor Summary
Constructors -
Method Summary
Modifier 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.
-
Constructor Details
-
FireworkSpawner
public FireworkSpawner()
-
-
Method Details
-
spawnRandomFireworksWithDelay
public 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
public static org.bukkit.FireworkEffect createRandomFireworkEffect()Creates a random firework effect with random colors, flicker, and trail.- Returns:
- a randomly generated FireworkEffect
-