package com.ezyro.emanhmc;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.PlayerDeathEvent;

public class LightningOnDeath {
	
	@EventHandler
	public void onPlayerDeath(PlayerDeathEvent e) {
		Player p = (Player)e.getEntity().getPlayer();
		p.getWorld().strikeLightningEffect(p.getLocation());
	}

}

package com.ezyro.emanhmc.lod;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener {
	@Override
	public void onEnable() {
		getServer().getPluginManager().registerEvents(this, this);
	}
	
	@EventHandler
	public void onPlayerDeath(PlayerDeathEvent e) {
		Player p = (Player)e.getEntity().getPlayer();
		p.getWorld().strikeLightningEffect(p.getLocation());
	}

}

Update Main.java