[Util] FireworkEffectPlayer V2(.1) | No reflections!

Discussion in 'Resources' started by FartFails, Mar 10, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    Hai Bukkit!

    I'm posting a way to detonate fireworks directly without reflections or NMS!

    I've found it on the forum(DevRosemberg), but his version only supports óne color and has a default type(Edit: oops, it does support fireworkeffect :O), so i made a class of it. Sorry for bad english, Im dutch!

    The code(Replace 'plugin' by any plugin) ;
    package 'Your package';
    import org.bukkit.ChatColor;
    import org.bukkit.Color;
    import org.bukkit.FireworkEffect;
    import org.bukkit.Location;
    import org.bukkit.FireworkEffect.Type;
    import org.bukkit.entity.Firework;
    import org.bukkit.inventory.meta.FireworkMeta;
    import org.bukkit.plugin.Plugin;
    import org.bukkit.scheduler.BukkitRunnable;
    public class FireworkEffectPlayer {
    public static void playFirework(Location l, FireworkEffect ef){
    final Firework f = (Firework)l.getWorld().spawn(l, Firework.class);
    FireworkMeta meta = f.getFireworkMeta();
    new BukkitRunnable() {
    public void run() {
    }.runTaskLater(plugin, 2);
Thread Status:
Not open for further replies.

Share This Page