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
    Modifier and Type
    Field
    Description
    static final Random
     
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static org.bukkit.FireworkEffect
    Creates a random firework effect with random colors, flicker, and trail.
    static void
    spawnRandomFireworksWithDelay(org.bukkit.entity.Entity mob, int count, int delay)
    Spawns multiple random fireworks with a delay between each.
  • Field Details

    • random

      static final Random 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 spawning
      count - the number of fireworks to spawn
      delay - 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