From e4df313132b7a3c5604edcd05d30f4df4f07194a Mon Sep 17 00:00:00 2001 From: PhanaticD Date: Sun, 20 Jan 2019 04:14:54 -0500 Subject: [PATCH] fix cooldown for fireshield not applying --- .../projectkorra/firebending/FireShield.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/com/projectkorra/projectkorra/firebending/FireShield.java b/src/com/projectkorra/projectkorra/firebending/FireShield.java index dad7f13e..be5596b5 100644 --- a/src/com/projectkorra/projectkorra/firebending/FireShield.java +++ b/src/com/projectkorra/projectkorra/firebending/FireShield.java @@ -1,7 +1,11 @@ package com.projectkorra.projectkorra.firebending; -import java.util.Random; - +import com.projectkorra.projectkorra.GeneralMethods; +import com.projectkorra.projectkorra.ability.FireAbility; +import com.projectkorra.projectkorra.ability.util.Collision; +import com.projectkorra.projectkorra.attribute.Attribute; +import com.projectkorra.projectkorra.firebending.util.FireDamageTimer; +import com.projectkorra.projectkorra.util.ParticleEffect; import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; @@ -12,12 +16,7 @@ import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.util.Vector; -import com.projectkorra.projectkorra.GeneralMethods; -import com.projectkorra.projectkorra.ability.FireAbility; -import com.projectkorra.projectkorra.ability.util.Collision; -import com.projectkorra.projectkorra.attribute.Attribute; -import com.projectkorra.projectkorra.firebending.util.FireDamageTimer; -import com.projectkorra.projectkorra.util.ParticleEffect; +import java.util.Random; public class FireShield extends FireAbility { @@ -103,12 +102,15 @@ public class FireShield extends FireAbility { @Override public void progress() { if (!this.bPlayer.canBendIgnoreCooldowns(this)) { + this.bPlayer.addCooldown(this); this.remove(); return; } else if ((!this.player.isSneaking() && this.shield) || (System.currentTimeMillis() > this.getStartTime() + this.shieldDuration && this.shield && this.shieldDuration > 0)) { + this.bPlayer.addCooldown(this); this.remove(); return; } else if (System.currentTimeMillis() > this.getStartTime() + this.discDuration && !this.shield) { + this.bPlayer.addCooldown(this); this.remove(); return; }