Various fixes

Fixes cooldowns affecting fall induced shockwaves and airbursts
Fixes airscooter randomly ending
Fixes avatarstate causing jitter on airscooter
Fixes airscooter removing fly
Fixes preset message for perm remove
This commit is contained in:
OmniCypher 2016-02-14 13:50:02 -08:00
parent 27a658affe
commit 8527705ff3
4 changed files with 10 additions and 6 deletions

View file

@ -1,5 +1,6 @@
package com.projectkorra.projectkorra.airbending;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.ability.AirAbility;
import com.projectkorra.projectkorra.avatar.AvatarState;
@ -91,6 +92,10 @@ public class AirBurst extends AirAbility {
}
private void fallBurst() {
if (bPlayer.isOnCooldown("AirBurst")) {
return;
}
Location location = player.getLocation();
double x, y, z;
double r = 1;

View file

@ -87,7 +87,7 @@ public class AirScooter extends AirAbility {
@Override
public void progress() {
if (!bPlayer.canBendIgnoreCooldowns(this) || !player.isFlying()) {
if (!bPlayer.canBendIgnoreCooldowns(this)) {
remove();
return;
}
@ -138,9 +138,6 @@ public class AirScooter extends AirAbility {
@Override
public void remove() {
super.remove();
player.setFlying(hadFly);
player.setAllowFlight(canFly);
player.setSprinting(false);
}
private void spinScooter() {

View file

@ -119,7 +119,7 @@ public class PresetCommand extends PKCommand {
bPlayer2 = BendingPlayer.getBendingPlayer(player2);
}
if (bPlayer2.isPermaRemoved()) {
player.sendMessage(ChatColor.RED + "Your bending was permanently removed.");
player.sendMessage(ChatColor.RED + "That players bending was permanently removed.");
return;
}
boolean boundAll = Preset.bindExternalPreset(player2, name);
@ -148,7 +148,7 @@ public class PresetCommand extends PKCommand {
bPlayer2 = BendingPlayer.getBendingPlayer(player2);
}
if (bPlayer2.isPermaRemoved()) {
player.sendMessage(ChatColor.RED + "Your bending was permanently removed.");
player.sendMessage(ChatColor.RED + "That players bending was permanently removed.");
return;
}
Preset preset = Preset.getPreset(player, name);

View file

@ -44,6 +44,8 @@ public class Shockwave extends EarthAbility {
return;
} else if (player.getFallDistance() < threshold || !isEarthbendable(player.getLocation().add(0, -1, 0).getBlock())) {
return;
} else if(bPlayer.isOnCooldown("Shockwave")) {
return;
}
areaShockwave();