A plugin for lightning when people die. (Please Help me out)

Discussion in 'Archived: Plugin Requests' started by mariofan765, Apr 18, 2012.

  1. Offline

    mariofan765

    I've been searching for a plugin, that makes it so when people die in any way, lightning strikes. The lightning could strike anywhere, but by the spawn would be nice.

    If you need more information of what i'm thinking of, feel free to ask me:D

    Happy coding!
    -mariofan765
     
  2. Offline

    IcyRelic

    I could do it pm me please

    I will start it when i get home from school so pm me with everything you want in it
     
  3. Offline

    Jakeob22

    I have a question, do you want it to be where he dies or where he spawns?
     
  4. Offline

    mariofan765

    Where he dies, thanks
     
  5. Offline

    YoshiGenius

    will do right now.
     
  6. Offline

    IcyRelic

  7. Offline

    YoshiGenius

  8. Offline

    IcyRelic

    what he wants is already made from what i can see he is making a hunger games server and DeathCannon is the plugin for him it does exactly what he wants
     
  9. Offline

    Scizzr

    Done. Literally took me 20 minutes.

    Download:
    http://dl.dropbox.com/u/12031543/gaming/Minecraft/LightningDeath.jar
    MD5 = 7329620cd52779ff66e1c75f99daa460

    Source:
    Code:
    package com.scizzr.bukkit.plugins.lightningdeath;
     
    import java.util.logging.Logger;
     
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.Listener;
    import org.bukkit.event.entity.PlayerDeathEvent;
    import org.bukkit.plugin.PluginDescriptionFile;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class Main extends JavaPlugin {
        public static Logger log = Logger.getLogger("Minecraft");
        public static PluginDescriptionFile info;
        public static PluginManager pm;
        public static String prefixConsole;
     
        public void onEnable() {
            info = getDescription();
         
            prefixConsole = "[" + info.getName() + "] ";
         
            pm = getServer().getPluginManager();
            final Players listenerPlayers = new Players(this); pm.registerEvents(listenerPlayers, this);
         
            log.info(prefixConsole + "enabled");
        }
     
        public void onDisable() {
                log.info(prefixConsole + "disabled");
         
        }
     
        class Players implements Listener {
            Main plugin;
         
            public Players(Main instance) {
                plugin = instance;
            }
     
            @EventHandler(priority = EventPriority.MONITOR)
            public void onPlayerDeath(PlayerDeathEvent e) {
                e.getEntity().getWorld().strikeLightningEffect(e.getEntity().getLocation());
            }
        }
    }
    
    plugin.yml:
    Code:
    name: LightningDeath
    version: 1.2.5-R1_b1
    main: com.scizzr.bukkit.plugins.lightningdeath.Main
    authors:
      - Scizzr
      - cembry90
    
    [cake] Enjoy.
     

Share This Page