Fix lightning orb duping

This commit is contained in:
AlexTheCoder 2016-07-28 19:43:43 -04:00
parent 853fe31fbe
commit 97d5d21a55

View File

@ -1,31 +1,36 @@
package mineplex.minecraft.game.classcombat.Skill.Mage;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.bukkit.*;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.itemstack.ItemBuilder;
import mineplex.core.projectile.IThrown;
import mineplex.core.projectile.ProjectileUser;
import mineplex.core.updater.UpdateType;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.Item;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import mineplex.core.common.util.F;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.projectile.IThrown;
import mineplex.core.projectile.ProjectileUser;
import mineplex.core.updater.UpdateType;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
import org.bukkit.event.player.*;
import org.bukkit.event.player.PlayerEvent;
public class LightningOrb extends SkillActive implements IThrown
{
@ -99,7 +104,7 @@ public class LightningOrb extends SkillActive implements IThrown
public void Skill(Player player, int level)
{
//Action
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(57));
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()),new ItemBuilder(Material.DIAMOND_BLOCK).setTitle(UtilMath.random.nextDouble() + "").build());
item.setVelocity(player.getLocation().getDirection());
Factory.Projectile().AddThrow(item, player, this, 5000 - (400 * level), true, true, false, false,
Sound.FIZZ, 0.6f, 1.6f, ParticleType.FIREWORKS_SPARK, UpdateType.TICK, 0.4f);