Search in sources :

Example 11 with WarlordsDamageHealingEvent

use of com.ebicep.warlords.events.WarlordsDamageHealingEvent in project Warlords by ebicep.

the class BloodLust method onActivate.

@Override
public boolean onActivate(WarlordsPlayer wp, Player p) {
    wp.subtractEnergy(energyCost);
    BloodLust tempBloodLust = new BloodLust();
    wp.getCooldownManager().addCooldown(new RegularCooldown<BloodLust>(name, "LUST", BloodLust.class, tempBloodLust, wp, CooldownTypes.ABILITY, cooldownManager -> {
    }, duration * 20) {

        @Override
        public boolean distinct() {
            return true;
        }

        @Override
        public void onDamageFromAttacker(WarlordsDamageHealingEvent event, float currentDamageValue, boolean isCrit) {
            WarlordsPlayer attacker = event.getAttacker();
            BloodLust bloodLust = (BloodLust) attacker.getSpec().getBlue();
            attacker.addHealingInstance(attacker, "Blood Lust", currentDamageValue * (bloodLust.getDamageConvertPercent() / 100f), currentDamageValue * (bloodLust.getDamageConvertPercent() / 100f), -1, 100, false, false);
        }
    });
    Utils.playGlobalSound(p.getLocation(), "warrior.bloodlust.activation", 2, 1);
    new GameRunnable(wp.getGame()) {

        @Override
        public void run() {
            if (wp.getCooldownManager().hasCooldown(tempBloodLust)) {
                Location location = wp.getLocation();
                location.add((Math.random() - 0.5) * 1, 1.2, (Math.random() - 0.5) * 1);
                ParticleEffect.REDSTONE.display(new ParticleEffect.OrdinaryColor(255, 0, 0), location, 500);
            } else {
                this.cancel();
            }
        }
    }.runTaskTimer(0, 4);
    return true;
}
Also used : Utils(com.ebicep.warlords.util.warlords.Utils) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) RegularCooldown(com.ebicep.warlords.player.cooldowns.cooldowns.RegularCooldown) Location(org.bukkit.Location) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) CooldownTypes(com.ebicep.warlords.player.cooldowns.CooldownTypes) Player(org.bukkit.entity.Player) AbstractAbility(com.ebicep.warlords.classes.AbstractAbility) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) ParticleEffect(com.ebicep.warlords.effects.ParticleEffect) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) Location(org.bukkit.Location)

Example 12 with WarlordsDamageHealingEvent

use of com.ebicep.warlords.events.WarlordsDamageHealingEvent in project Warlords by ebicep.

the class HealingTotem method onActivation.

@Override
protected void onActivation(WarlordsPlayer wp, Player player, ArmorStand totemStand) {
    wp.getCooldownManager().addRegularCooldown(name, "TOTEM", HealingTotem.class, new HealingTotem(), wp, CooldownTypes.ABILITY, cooldownManager -> {
    }, duration * 20);
    new GameRunnable(wp.getGame()) {

        int timeLeft = 5;

        @Override
        public void run() {
            if (timeLeft != 0) {
                Location initParticleLoc = totemStand.getLocation().clone().add(0, 1.6, 0);
                ParticleEffect.VILLAGER_HAPPY.display(0.4F, 0.2F, 0.4F, 0.05F, 5, initParticleLoc, 500);
                for (Player player1 : wp.getWorld().getPlayers()) {
                    player1.playSound(totemStand.getLocation(), "shaman.earthlivingweapon.impact", 2, 0.9f);
                }
                Location totemLoc = totemStand.getLocation();
                totemLoc.add(0, 2, 0);
                Location particleLoc = totemLoc.clone();
                for (int i = 0; i < 1; i++) {
                    for (int j = 0; j < 12; j++) {
                        double angle = j / 10D * Math.PI * 2;
                        double width = radius;
                        particleLoc.setX(totemLoc.getX() + Math.sin(angle) * width);
                        particleLoc.setY(totemLoc.getY() + i / 2D);
                        particleLoc.setZ(totemLoc.getZ() + Math.cos(angle) * width);
                        ParticleEffect.FIREWORKS_SPARK.display(0, 0, 0, 0, 1, particleLoc, 500);
                    }
                }
                CircleEffect circle = new CircleEffect(wp.getGame(), wp.getTeam(), totemStand.getLocation().add(0, 1, 0), radius);
                circle.addEffect(new CircumferenceEffect(ParticleEffect.VILLAGER_HAPPY, ParticleEffect.REDSTONE).particlesPerCircumference(1.5));
                circle.playEffects();
                // 1
                // 1.35
                // 1.7
                // 2.05
                // 2.4
                // 2.85
                float healMultiplier = 1 + (.35f * (5 - timeLeft));
                PlayerFilter.entitiesAround(totemStand, radius, radius, radius).aliveTeammatesOf(wp).forEach((nearPlayer) -> {
                    nearPlayer.addHealingInstance(wp, name, minDamageHeal * healMultiplier, maxDamageHeal * healMultiplier, critChance, critMultiplier, false, false);
                });
            } else {
                PlayerFilter.entitiesAround(totemStand, radius, radius, radius).aliveTeammatesOf(wp).forEach((nearPlayer) -> {
                    nearPlayer.addHealingInstance(wp, name, minDamageHeal * 3.1f, maxDamageHeal * 3.1f, critChance, critMultiplier, false, false);
                });
                Utils.playGlobalSound(totemStand.getLocation(), Sound.BLAZE_DEATH, 1.2f, 0.7f);
                Utils.playGlobalSound(totemStand.getLocation(), "shaman.heal.impact", 2, 1);
                new FallingBlockWaveEffect(totemStand.getLocation().clone().add(0, 1, 0), 3, 0.8, Material.SAPLING, (byte) 1).play();
                totemStand.remove();
                this.cancel();
            }
            timeLeft--;
        }
    }.runTaskTimer(0, 20);
    new GameRunnable(wp.getGame()) {

        int counter = 0;

        @Override
        public void run() {
            if (wp.isDead() || counter >= 20 * duration) {
                this.cancel();
            } else if (wp.isSneaking()) {
                PlayerFilter.entitiesAround(totemStand.getLocation(), radius, radius, radius).aliveEnemiesOf(wp).forEach((p) -> {
                    wp.sendMessage(WarlordsPlayer.RECEIVE_ARROW + ChatColor.GRAY + " Your Healing Totem has crippled " + ChatColor.YELLOW + p.getName() + ChatColor.GRAY + "!");
                    p.getCooldownManager().addCooldown(new RegularCooldown<HealingTotem>("Totem Crippling", "CRIP", HealingTotem.class, new HealingTotem(), wp, CooldownTypes.DEBUFF, cooldownManager -> {
                    }, crippleDuration * 20) {

                        @Override
                        public float modifyDamageBeforeInterveneFromAttacker(WarlordsDamageHealingEvent event, float currentDamageValue) {
                            return currentDamageValue * .75f;
                        }
                    });
                });
                Utils.playGlobalSound(totemStand.getLocation(), "paladin.hammeroflight.impact", 1.5f, 0.2f);
                new FallingBlockWaveEffect(totemStand.getLocation().add(0, 1, 0), 7, 2, Material.SAPLING, (byte) 1).play();
                this.cancel();
            }
            counter++;
        }
    }.runTaskTimer(0, 0);
}
Also used : Utils(com.ebicep.warlords.util.warlords.Utils) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) AbstractTotemBase(com.ebicep.warlords.abilties.internal.AbstractTotemBase) CircumferenceEffect(com.ebicep.warlords.effects.circle.CircumferenceEffect) Warlords(com.ebicep.warlords.Warlords) CooldownTypes(com.ebicep.warlords.player.cooldowns.CooldownTypes) Sound(org.bukkit.Sound) Player(org.bukkit.entity.Player) FixedMetadataValue(org.bukkit.metadata.FixedMetadataValue) PlayerFilter(com.ebicep.warlords.util.warlords.PlayerFilter) ItemStack(org.bukkit.inventory.ItemStack) RegularCooldown(com.ebicep.warlords.player.cooldowns.cooldowns.RegularCooldown) Location(org.bukkit.Location) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) ArmorStand(org.bukkit.entity.ArmorStand) ChatColor(org.bukkit.ChatColor) CircleEffect(com.ebicep.warlords.effects.circle.CircleEffect) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) ParticleEffect(com.ebicep.warlords.effects.ParticleEffect) Material(org.bukkit.Material) FallingBlockWaveEffect(com.ebicep.warlords.effects.FallingBlockWaveEffect) Player(org.bukkit.entity.Player) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) CircumferenceEffect(com.ebicep.warlords.effects.circle.CircumferenceEffect) FallingBlockWaveEffect(com.ebicep.warlords.effects.FallingBlockWaveEffect) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) CircleEffect(com.ebicep.warlords.effects.circle.CircleEffect) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) Location(org.bukkit.Location)

Example 13 with WarlordsDamageHealingEvent

use of com.ebicep.warlords.events.WarlordsDamageHealingEvent in project Warlords by ebicep.

the class OrbsOfLife method onActivate.

@Override
public boolean onActivate(WarlordsPlayer wp, Player player) {
    wp.subtractEnergy(energyCost);
    OrbsOfLife tempOrbsOfLight = new OrbsOfLife();
    wp.getCooldownManager().addCooldown(new PersistentCooldown<OrbsOfLife>(name, "ORBS", OrbsOfLife.class, tempOrbsOfLight, wp, CooldownTypes.ABILITY, cooldownManager -> {
    }, duration * 20, orbsOfLife -> orbsOfLife.getSpawnedOrbs().isEmpty()) {

        @Override
        public void onInterveneFromAttacker(WarlordsDamageHealingEvent event, float currentDamageValue) {
            spawnOrbs(event.getPlayer(), event.getAbility(), this);
            if (event.getAbility().equals("Crippling Strike")) {
                spawnOrbs(event.getPlayer(), event.getAbility(), this);
            }
        }

        @Override
        public void onShieldFromAttacker(WarlordsDamageHealingEvent event, float currentDamageValue, boolean isCrit) {
            spawnOrbs(event.getPlayer(), event.getAbility(), this);
            if (event.getAbility().equals("Crippling Strike")) {
                spawnOrbs(event.getPlayer(), event.getAbility(), this);
            }
        }

        @Override
        public void onDamageFromAttacker(WarlordsDamageHealingEvent event, float currentDamageValue, boolean isCrit) {
            spawnOrbs(event.getPlayer(), event.getAbility(), this);
            if (event.getAbility().equals("Crippling Strike")) {
                spawnOrbs(event.getPlayer(), event.getAbility(), this);
            }
        }
    });
    tempOrbsOfLight.getSpawnedOrbs().add(new Orb(((CraftWorld) player.getLocation().getWorld()).getHandle(), generateSpawnLocation(player.getLocation()), wp));
    tempOrbsOfLight.getSpawnedOrbs().add(new Orb(((CraftWorld) player.getLocation().getWorld()).getHandle(), generateSpawnLocation(player.getLocation()), wp));
    Utils.playGlobalSound(player.getLocation(), "warrior.revenant.orbsoflife", 2, 1);
    new GameRunnable(wp.getGame()) {

        int counter = 0;

        boolean wasSneaking = false;

        @Override
        public void run() {
            counter++;
            if (wp.isAlive() && wp.isSneaking() && !wasSneaking) {
                // setting target player to move towards (includes self)
                tempOrbsOfLight.getSpawnedOrbs().forEach(orb -> orb.setPlayerToMoveTowards(PlayerFilter.entitiesAround(orb.armorStand.getLocation(), floatingOrbRadius, floatingOrbRadius, floatingOrbRadius).aliveTeammatesOf(wp).closestFirst(orb.getArmorStand().getLocation()).findFirstOrNull()));
                // moving orb
                new GameRunnable(wp.getGame()) {

                    @Override
                    public void run() {
                        tempOrbsOfLight.getSpawnedOrbs().stream().filter(orb -> orb.getPlayerToMoveTowards() != null).forEach(targetOrb -> {
                            WarlordsPlayer target = targetOrb.getPlayerToMoveTowards();
                            ArmorStand orbArmorStand = targetOrb.getArmorStand();
                            Location orbLocation = orbArmorStand.getLocation();
                            Entity orb = orbArmorStand.getPassenger();
                            // must eject passenger then reassign it before teleporting bc ???
                            orbArmorStand.eject();
                            orbArmorStand.teleport(new LocationBuilder(orbLocation.clone()).add(target.getLocation().toVector().subtract(orbLocation.toVector()).normalize().multiply(1)).get());
                            orbArmorStand.setPassenger(orb);
                            ParticleEffect.VILLAGER_HAPPY.display(0, 0, 0, 0, 1, orbArmorStand.getLocation().add(0, 1.65, 0), 500);
                        });
                        if (tempOrbsOfLight.getSpawnedOrbs().stream().noneMatch(orb -> orb.getPlayerToMoveTowards() != null)) {
                            this.cancel();
                        }
                    }
                }.runTaskTimer(0, 1);
                wp.sendMessage(WarlordsPlayer.RECEIVE_ARROW + ChatColor.GRAY + " Your current " + ChatColor.GREEN + name + ChatColor.GRAY + " will now levitate towards you or a teammate!");
                Utils.playGlobalSound(wp.getLocation(), Sound.LEVEL_UP, 0.08f, 0.7f);
                ParticleEffect.ENCHANTMENT_TABLE.display(0.8f, 0, 0.8f, 0.2f, 10, wp.getLocation().add(0, 1.5, 0), 500);
            }
            wasSneaking = player.isSneaking();
            if (counter >= 20 * duration || wp.isDead()) {
                this.cancel();
            }
        }
    }.runTaskTimer(0, 0);
    return true;
}
Also used : Utils(com.ebicep.warlords.util.warlords.Utils) PersistentCooldown(com.ebicep.warlords.player.cooldowns.cooldowns.PersistentCooldown) EntityHuman(net.minecraft.server.v1_8_R3.EntityHuman) Random(java.util.Random) Player(org.bukkit.entity.Player) ArrayList(java.util.ArrayList) PacketPlayOutEntityDestroy(net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy) Location(org.bukkit.Location) CraftWorld(org.bukkit.craftbukkit.v1_8_R3.CraftWorld) EntityExperienceOrb(net.minecraft.server.v1_8_R3.EntityExperienceOrb) AbstractAbility(com.ebicep.warlords.classes.AbstractAbility) ParticleEffect(com.ebicep.warlords.effects.ParticleEffect) Material(org.bukkit.Material) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) Entity(org.bukkit.entity.Entity) CreatureSpawnEvent(org.bukkit.event.entity.CreatureSpawnEvent) BukkitRunnable(org.bukkit.scheduler.BukkitRunnable) Warlords(com.ebicep.warlords.Warlords) CooldownTypes(com.ebicep.warlords.player.cooldowns.CooldownTypes) Sound(org.bukkit.Sound) EntityType(org.bukkit.entity.EntityType) PlayerFilter(com.ebicep.warlords.util.warlords.PlayerFilter) World(net.minecraft.server.v1_8_R3.World) List(java.util.List) LocationBuilder(com.ebicep.warlords.util.bukkit.LocationBuilder) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer) ArmorStand(org.bukkit.entity.ArmorStand) CooldownFilter(com.ebicep.warlords.player.cooldowns.CooldownFilter) ChatColor(org.bukkit.ChatColor) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) Entity(org.bukkit.entity.Entity) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) ArmorStand(org.bukkit.entity.ArmorStand) LocationBuilder(com.ebicep.warlords.util.bukkit.LocationBuilder) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) CraftWorld(org.bukkit.craftbukkit.v1_8_R3.CraftWorld) EntityExperienceOrb(net.minecraft.server.v1_8_R3.EntityExperienceOrb) Location(org.bukkit.Location)

Example 14 with WarlordsDamageHealingEvent

use of com.ebicep.warlords.events.WarlordsDamageHealingEvent in project Warlords by ebicep.

the class RemedicChains method onActivate.

@Override
public boolean onActivate(@Nonnull WarlordsPlayer wp, @Nonnull Player player) {
    RemedicChains tempRemedicChain = new RemedicChains();
    int targetHit = 0;
    for (WarlordsPlayer chainTarget : PlayerFilter.entitiesAround(player, 10, 10, 10).aliveTeammatesOfExcludingSelf(wp).closestFirst(wp).limit(alliesAffected)) {
        chainTarget.getCooldownManager().addCooldown(new RegularCooldown<RemedicChains>(name, "REMEDIC", RemedicChains.class, tempRemedicChain, wp, CooldownTypes.ABILITY, cooldownManager -> {
        }, duration * 20) {

            @Override
            public float modifyDamageBeforeInterveneFromAttacker(WarlordsDamageHealingEvent event, float currentDamageValue) {
                return currentDamageValue * 1.1f;
            }
        });
        player.sendMessage(WarlordsPlayer.RECEIVE_ARROW + ChatColor.GRAY + " Your Remedic Chains is now protecting " + ChatColor.YELLOW + chainTarget.getName() + ChatColor.GRAY + "!");
        chainTarget.sendMessage(WarlordsPlayer.RECEIVE_ARROW + " " + ChatColor.GRAY + wp.getName() + "'s" + ChatColor.YELLOW + " Remedic Chains" + ChatColor.GRAY + " is now healing you for " + ChatColor.GOLD + duration + ChatColor.GRAY + " seconds!");
        HashMap<WarlordsPlayer, Integer> timeLinked = new HashMap<>();
        targetHit++;
        new GameRunnable(wp.getGame()) {

            int counter = 0;

            @Override
            public void run() {
                boolean outOfRange = wp.getLocation().distanceSquared(chainTarget.getLocation()) > linkBreakRadius * linkBreakRadius;
                if (counter % 20 == 0 && !outOfRange) {
                    timeLinked.compute(chainTarget, (k, v) -> v == null ? 1 : v + 1);
                    float maxHealing = chainTarget.getMaxHealth() * maxHealthHealing / 100f;
                    chainTarget.addHealingInstance(wp, name, maxHealing, maxHealing, -1, 100, false, false);
                    float selfMaxHealing = wp.getMaxHealth() * maxHealthHealing / 100f;
                    wp.addHealingInstance(wp, name, selfMaxHealing, selfMaxHealing, -1, 100, false, false);
                }
                if (counter % 8 == 0) {
                    if (wp.getCooldownManager().hasCooldown(tempRemedicChain)) {
                        EffectUtils.playParticleLinkAnimation(wp.getLocation(), chainTarget.getLocation(), 250, 200, 250, 1);
                        // Ally is out of range, break link
                        if (outOfRange) {
                            for (Map.Entry<WarlordsPlayer, Integer> entry : timeLinked.entrySet()) {
                                float totalHealingMultiplier = (healingMultiplier * entry.getValue());
                                entry.getKey().addHealingInstance(wp, name, minDamageHeal * totalHealingMultiplier, maxDamageHeal * totalHealingMultiplier, -1, 100, false, false);
                            }
                            chainTarget.getCooldownManager().removeCooldown(tempRemedicChain);
                            chainTarget.sendMessage(ChatColor.RED + "You left the link range early!");
                            this.cancel();
                        }
                        if (chainTarget.isDead()) {
                            this.cancel();
                        }
                    } else {
                        // Ally was in range, full healing
                        if (!outOfRange && chainTarget.isAlive()) {
                            chainTarget.addHealingInstance(wp, name, minDamageHeal, maxDamageHeal, critChance, critMultiplier, false, false);
                        }
                        ParticleEffect.VILLAGER_HAPPY.display(0.5f, 0.5f, 0.5f, 1, 10, chainTarget.getLocation().add(0, 1, 0), 500);
                        Utils.playGlobalSound(chainTarget.getLocation(), "rogue.remedicchains.impact", 0.06f, 1.4f);
                        this.cancel();
                    }
                }
                counter++;
            }
        }.runTaskTimer(0, 0);
    }
    if (targetHit >= 1) {
        Utils.playGlobalSound(player.getLocation(), "rogue.remedicchains.activation", 2, 0.2f);
        wp.subtractEnergy(energyCost);
        wp.getCooldownManager().addCooldown(new RegularCooldown<RemedicChains>(name, "REMEDIC", RemedicChains.class, tempRemedicChain, wp, CooldownTypes.ABILITY, cooldownManager -> {
        }, duration * 20) {

            @Override
            public float modifyDamageBeforeInterveneFromAttacker(WarlordsDamageHealingEvent event, float currentDamageValue) {
                return currentDamageValue * 1.1f;
            }
        });
    } else {
        wp.sendMessage(ChatColor.RED + "There are no allies nearby to link!");
    }
    return targetHit >= 1;
}
Also used : EffectUtils(com.ebicep.warlords.effects.EffectUtils) Utils(com.ebicep.warlords.util.warlords.Utils) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) CooldownTypes(com.ebicep.warlords.player.cooldowns.CooldownTypes) HashMap(java.util.HashMap) Player(org.bukkit.entity.Player) PlayerFilter(com.ebicep.warlords.util.warlords.PlayerFilter) RegularCooldown(com.ebicep.warlords.player.cooldowns.cooldowns.RegularCooldown) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) Map(java.util.Map) ChatColor(org.bukkit.ChatColor) AbstractAbility(com.ebicep.warlords.classes.AbstractAbility) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) Nonnull(javax.annotation.Nonnull) ParticleEffect(com.ebicep.warlords.effects.ParticleEffect) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) HashMap(java.util.HashMap) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent)

Example 15 with WarlordsDamageHealingEvent

use of com.ebicep.warlords.events.WarlordsDamageHealingEvent in project Warlords by ebicep.

the class IceBarrier method onActivate.

@Override
public boolean onActivate(WarlordsPlayer wp, Player player) {
    IceBarrier tempIceBarrier = new IceBarrier(damageReductionPercent);
    wp.getCooldownManager().addCooldown(new RegularCooldown<IceBarrier>(name, "ICE", IceBarrier.class, tempIceBarrier, wp, CooldownTypes.ABILITY, cooldownManager -> {
    }, duration * 20) {

        @Override
        public float modifyDamageAfterInterveneFromSelf(WarlordsDamageHealingEvent event, float currentDamageValue) {
            float newDamageValue = currentDamageValue * getDamageReduction();
            event.getPlayer().addAbsorbed(Math.abs(currentDamageValue - newDamageValue));
            return newDamageValue;
        }
    });
    Utils.playGlobalSound(player.getLocation(), "mage.icebarrier.activation", 2, 1);
    new GameRunnable(wp.getGame()) {

        @Override
        public void run() {
            if (wp.getCooldownManager().hasCooldown(tempIceBarrier)) {
                Location location = wp.getLocation();
                location.add(0, 1.5, 0);
                ParticleEffect.CLOUD.display(0.2F, 0.2F, 0.2F, 0.001F, 1, location, 500);
                ParticleEffect.FIREWORKS_SPARK.display(0.3F, 0.2F, 0.3F, 0.0001F, 1, location, 500);
            } else {
                this.cancel();
            }
        }
    }.runTaskTimer(0, 5);
    return true;
}
Also used : Utils(com.ebicep.warlords.util.warlords.Utils) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) RegularCooldown(com.ebicep.warlords.player.cooldowns.cooldowns.RegularCooldown) Location(org.bukkit.Location) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) CooldownTypes(com.ebicep.warlords.player.cooldowns.CooldownTypes) Player(org.bukkit.entity.Player) AbstractAbility(com.ebicep.warlords.classes.AbstractAbility) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) ParticleEffect(com.ebicep.warlords.effects.ParticleEffect) GameRunnable(com.ebicep.warlords.util.warlords.GameRunnable) WarlordsDamageHealingEvent(com.ebicep.warlords.events.WarlordsDamageHealingEvent) Location(org.bukkit.Location)

Aggregations

WarlordsDamageHealingEvent (com.ebicep.warlords.events.WarlordsDamageHealingEvent)17 WarlordsPlayer (com.ebicep.warlords.player.WarlordsPlayer)16 CooldownTypes (com.ebicep.warlords.player.cooldowns.CooldownTypes)16 RegularCooldown (com.ebicep.warlords.player.cooldowns.cooldowns.RegularCooldown)16 Utils (com.ebicep.warlords.util.warlords.Utils)16 Player (org.bukkit.entity.Player)16 AbstractAbility (com.ebicep.warlords.classes.AbstractAbility)14 ParticleEffect (com.ebicep.warlords.effects.ParticleEffect)14 GameRunnable (com.ebicep.warlords.util.warlords.GameRunnable)13 Location (org.bukkit.Location)11 PlayerFilter (com.ebicep.warlords.util.warlords.PlayerFilter)10 ChatColor (org.bukkit.ChatColor)8 Warlords (com.ebicep.warlords.Warlords)7 Nonnull (javax.annotation.Nonnull)6 EffectUtils (com.ebicep.warlords.effects.EffectUtils)5 CircleEffect (com.ebicep.warlords.effects.circle.CircleEffect)4 CircumferenceEffect (com.ebicep.warlords.effects.circle.CircumferenceEffect)4 Material (org.bukkit.Material)4 Sound (org.bukkit.Sound)4 ArmorStand (org.bukkit.entity.ArmorStand)3