mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
fix cooldown for fireshield not applying
This commit is contained in:
parent
fa8b051121
commit
e4df313132
1 changed files with 10 additions and 8 deletions
|
@ -1,7 +1,11 @@
|
||||||
package com.projectkorra.projectkorra.firebending;
|
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.Effect;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
@ -12,12 +16,7 @@ import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import java.util.Random;
|
||||||
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;
|
|
||||||
|
|
||||||
public class FireShield extends FireAbility {
|
public class FireShield extends FireAbility {
|
||||||
|
|
||||||
|
@ -103,12 +102,15 @@ public class FireShield extends FireAbility {
|
||||||
@Override
|
@Override
|
||||||
public void progress() {
|
public void progress() {
|
||||||
if (!this.bPlayer.canBendIgnoreCooldowns(this)) {
|
if (!this.bPlayer.canBendIgnoreCooldowns(this)) {
|
||||||
|
this.bPlayer.addCooldown(this);
|
||||||
this.remove();
|
this.remove();
|
||||||
return;
|
return;
|
||||||
} else if ((!this.player.isSneaking() && this.shield) || (System.currentTimeMillis() > this.getStartTime() + this.shieldDuration && this.shield && this.shieldDuration > 0)) {
|
} else if ((!this.player.isSneaking() && this.shield) || (System.currentTimeMillis() > this.getStartTime() + this.shieldDuration && this.shield && this.shieldDuration > 0)) {
|
||||||
|
this.bPlayer.addCooldown(this);
|
||||||
this.remove();
|
this.remove();
|
||||||
return;
|
return;
|
||||||
} else if (System.currentTimeMillis() > this.getStartTime() + this.discDuration && !this.shield) {
|
} else if (System.currentTimeMillis() > this.getStartTime() + this.discDuration && !this.shield) {
|
||||||
|
this.bPlayer.addCooldown(this);
|
||||||
this.remove();
|
this.remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue