This commit is contained in:
Simplicitee 2018-12-25 18:59:27 -05:00
parent b2a4be6cc9
commit ec081a4d65
2 changed files with 9 additions and 2 deletions

View file

@ -21,6 +21,7 @@ public class FerroControl extends MetalAbility implements PassiveAbility {
public FerroControl(final Player player) {
super(player);
start();
}
@Override
@ -59,6 +60,7 @@ public class FerroControl extends MetalAbility implements PassiveAbility {
this.block.getWorld().playSound(this.block.getLocation(), Sound.valueOf(sound), 0.5f, 0);
this.bPlayer.addCooldown(this, 200);
}
remove();
}
@Override
@ -88,7 +90,7 @@ public class FerroControl extends MetalAbility implements PassiveAbility {
@Override
public boolean isInstantiable() {
return true;
return false;
}
@Override

View file

@ -26,11 +26,14 @@ public class FastSwim extends WaterAbility implements PassiveAbility {
this.cooldown = ConfigManager.getConfig().getLong("Abilities.Water.Passive.FastSwim.Cooldown");
this.swimSpeed = ConfigManager.getConfig().getDouble("Abilities.Water.Passive.FastSwim.SpeedFactor");
this.duration = ConfigManager.getConfig().getLong("Abilities.Water.Passive.FastSwim.Duration");
start();
}
@Override
public void progress() {
if (!this.bPlayer.canUsePassive(this) || !this.bPlayer.canBendPassive(this) || CoreAbility.hasAbility(this.player, WaterSpout.class) || CoreAbility.hasAbility(this.player, EarthArmor.class) || CoreAbility.hasAbility(this.player, WaterArms.class)) {
remove();
return;
}
@ -38,11 +41,13 @@ public class FastSwim extends WaterAbility implements PassiveAbility {
if (this.player.isSneaking() && ElementalAbility.isWater(this.player.getLocation().getBlock()) && !this.bPlayer.isOnCooldown(this)) {
if (this.duration != 0 && System.currentTimeMillis() > this.getStartTime() + this.duration) {
this.bPlayer.addCooldown(this);
remove();
return;
}
this.player.setVelocity(this.player.getEyeLocation().getDirection().clone().normalize().multiply(this.swimSpeed));
} else if (!this.player.isSneaking()) {
this.bPlayer.addCooldown(this);
remove();
}
}
}
@ -78,7 +83,7 @@ public class FastSwim extends WaterAbility implements PassiveAbility {
@Override
public boolean isInstantiable() {
return true;
return false;
}
@Override