diff --git a/src/com/projectkorra/projectkorra/PKListener.java b/src/com/projectkorra/projectkorra/PKListener.java index 9ec61e3f..bbc28535 100644 --- a/src/com/projectkorra/projectkorra/PKListener.java +++ b/src/com/projectkorra/projectkorra/PKListener.java @@ -1081,7 +1081,7 @@ public class PKListener implements Listener { else if (AirFlight.isFlying(event.getPlayer())) { if (AirFlight.isHovering(event.getPlayer())) { Location loc = event.getFrom(); - Location toLoc = player.getLocation(); + Location toLoc = event.getTo(); if (loc.getX() != toLoc.getX() || loc.getY() != toLoc.getY() || loc.getZ() != toLoc.getZ()) { event.setCancelled(true); diff --git a/src/com/projectkorra/projectkorra/chiblocking/AcrobatStance.java b/src/com/projectkorra/projectkorra/chiblocking/AcrobatStance.java index bffe9efa..83ffd275 100644 --- a/src/com/projectkorra/projectkorra/chiblocking/AcrobatStance.java +++ b/src/com/projectkorra/projectkorra/chiblocking/AcrobatStance.java @@ -1,15 +1,15 @@ package com.projectkorra.projectkorra.chiblocking; -import com.projectkorra.projectkorra.Element; -import com.projectkorra.projectkorra.GeneralMethods; -import com.projectkorra.projectkorra.ability.ChiAbility; - import org.bukkit.Location; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; +import com.projectkorra.projectkorra.Element; +import com.projectkorra.projectkorra.GeneralMethods; +import com.projectkorra.projectkorra.ability.ChiAbility; + public class AcrobatStance extends ChiAbility { private int speed; @@ -30,11 +30,8 @@ public class AcrobatStance extends ChiAbility { ChiAbility stance = bPlayer.getStance(); if (stance != null) { - stance.remove(); if (stance instanceof AcrobatStance) { - bPlayer.setStance(null); - GeneralMethods.displayMovePreview(player, this); - player.playSound(player.getLocation(), Sound.ENTITY_ENDERDRAGON_SHOOT, 0.5F, 2F); + remove(); return; } } @@ -59,6 +56,16 @@ public class AcrobatStance extends ChiAbility { } } + @Override + public void remove() { + super.remove(); + bPlayer.setStance(null); + GeneralMethods.displayMovePreview(player, this); + player.playSound(player.getLocation(), Sound.ENTITY_ENDERDRAGON_SHOOT, 0.5F, 2F); + player.removePotionEffect(PotionEffectType.SPEED); + player.removePotionEffect(PotionEffectType.JUMP); + } + @Override public String getName() { return "AcrobatStance"; diff --git a/src/com/projectkorra/projectkorra/chiblocking/WarriorStance.java b/src/com/projectkorra/projectkorra/chiblocking/WarriorStance.java index c3fa3e04..144d7500 100644 --- a/src/com/projectkorra/projectkorra/chiblocking/WarriorStance.java +++ b/src/com/projectkorra/projectkorra/chiblocking/WarriorStance.java @@ -25,11 +25,8 @@ public class WarriorStance extends ChiAbility { ChiAbility stance = bPlayer.getStance(); if (stance != null) { - stance.remove(); if (stance instanceof WarriorStance) { - bPlayer.setStance(null); - GeneralMethods.displayMovePreview(player, this); - player.playSound(player.getLocation(), Sound.ENTITY_ENDERDRAGON_SHOOT, 0.5F, 2F); + remove(); return; } } @@ -54,6 +51,16 @@ public class WarriorStance extends ChiAbility { } } + @Override + public void remove() { + super.remove(); + bPlayer.setStance(null); + GeneralMethods.displayMovePreview(player, this); + player.playSound(player.getLocation(), Sound.ENTITY_ENDERDRAGON_SHOOT, 0.5F, 2F); + player.removePotionEffect(PotionEffectType.DAMAGE_RESISTANCE); + player.removePotionEffect(PotionEffectType.INCREASE_DAMAGE); + } + @Override public String getName() { return "WarriorStance"; diff --git a/src/com/projectkorra/projectkorra/util/logging/LogFilter.java b/src/com/projectkorra/projectkorra/util/logging/LogFilter.java index 3002f961..4c7d3db1 100644 --- a/src/com/projectkorra/projectkorra/util/logging/LogFilter.java +++ b/src/com/projectkorra/projectkorra/util/logging/LogFilter.java @@ -59,7 +59,7 @@ public class LogFilter implements Filter { return false; } - if(Bukkit.getServer().getPluginManager().isPluginEnabled(ProjectKorra.plugin.getName())) { + if (!Bukkit.getServer().getPluginManager().isPluginEnabled(ProjectKorra.plugin.getName())) { return false; }