Minecraft Death Firework mod 2026 download
logo
minecraft mod Death Firework

Death Firework

Game Version: CB 1.7.2-R0.3
Total Downloads: 3,112
Updated: Mar 21, 2014
Created: Dec 15, 2013
Download Death FireworkDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
DeathFirework 1.2 release 4.72 KB Mar 21, 2014 CB 1.7.2-R0.3 2,053 download Death Firework DeathFirework 1.2 releaseDownload
DeathFirework 1.1 release 3.09 KB Jan 11, 2014 1.7.4 626 download Death Firework DeathFirework 1.1 releaseDownload
DeathFirework 1.0 release 3.09 KB Dec 15, 2013 1.7.4 433 download Death Firework DeathFirework 1.0 releaseDownload

Description

Share this:

This plugin launches a Red Firework wherever any player dies. (I made this to make it easier to tell when you had killed somebody in the Survival Games.)

**EDIT**

I probably won't bother with changing anything else on this plugin. It as of now fulfills the goal I originally designed it to do. I welcome any Bukkit coders to have at it if they think they can improve this plugin. You are free to use the source code of this plugin in anything you want to without needing to credit me in any way. I hope this can help somebody out!

Plugin Source Code: (This was coded for 1.7.2, so it may need a bit of updating for newer versions of Bukkit.)
_________________________________________________________________________________________________________________________
import org.bukkit.Bukkit;
import org.bukkit.Color;
import org.bukkit.FireworkEffect;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.entity.Firework;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.inventory.meta.FireworkMeta;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener {

    public void onEnable() {
        Bukkit.getServer().getPluginManager().registerEvents(this, this);
        getConfig().options().copyDefaults(true);
        saveConfig();
    }

    @EventHandler
    public void onEntityDeath(final PlayerDeathEvent e) {
    if (e.getEntity() instanceof Player)
        if(this.getConfig().getBoolean("Firework-air-launch")) {
        Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
            public void run() {
                Firework f = (Firework) e.getEntity().getWorld().spawn(e.getEntity().getLocation(), Firework.class);

                FireworkMeta fm = f.getFireworkMeta();
                fm.addEffect(FireworkEffect.builder()
                        .flicker(true)
                        .trail(true)
                        .with(Type.BALL_LARGE)
                        .withColor(Color.RED)
                        .withFade(Color.RED)
                        .build());
                fm.setPower(0);
                f.setFireworkMeta(fm);
            }
        }, 20);}
        else
            Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
                public void run() {
                    Firework f = (Firework) e.getEntity().getWorld().spawn(e.getEntity().getLocation(), Firework.class);

                    FireworkMeta fm = f.getFireworkMeta();
                    fm.addEffect(FireworkEffect.builder()
                            .flicker(true)
                            .trail(true)
                            .with(Type.BALL_LARGE)
                            .withColor(Color.RED)
                            .withFade(Color.RED)
                            .build());
                    fm.setPower(0);
                    f.setFireworkMeta(fm);
                    f.detonate();
                }
            }, 20);
    }
}
_____________________
**Config.yml contents**
version: 1.0
Firework-air-launch: true
_____________________

Comments

Add a comment