@SuppressWarnings("deprecation")
@EventHandler
	public void PlayerInteract(PlayerInteractEvent event)
	{
		final Player p = event.getPlayer();
		int amount = p.getItemInHand().getAmount();
		final Location loc = p.getTargetBlock(null, 256).getLocation();
		if(p.hasPermission("skeptermod.useitem.chaoslightning") || (p.isOp()))
		{
			if(p.getItemInHand().getType().equals(Material.EMERALD) && p.getItemInHand().getEnchantmentLevel(Enchantment.ARROW_DAMAGE) == 7 && (event.getAction().equals(Action.RIGHT_CLICK_AIR) || event.getAction().equals(Action.RIGHT_CLICK_BLOCK)))
				{
					p.getItemInHand().setAmount(amount-1);
	            	if(amount == 1)
	            		p.setItemInHand(null);
	            	Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){ //create a new DELAYED runnable task

						
						public void run() { //when run...
							p.getWorld().strikeLightning(loc);
							}
						}
        				
        			, 10);
	            	Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){ //create a new DELAYED runnable task

						
						public void run() { //when run...
							p.getWorld().strikeLightning(loc);
							}
						}
        				
        			, 20);
	            	Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){ //create a new DELAYED runnable task

						
						public void run() { //when run...
							p.getWorld().strikeLightning(loc);
							}
						}
        				
        			, 30);
	            	Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){ //create a new DELAYED runnable task

						
						public void run() { //when run...
							p.getWorld().strikeLightning(loc);
							}
						}
        				
        			, 40);
	            	Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){ //create a new DELAYED runnable task

						
						public void run() { //when run...
							p.getWorld().strikeLightning(loc);
							}
						}
        				
        			, 50);


		}
	}
}