mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Flight, Chi Stance & Chris' life (#628)
* Fixed sprint with Flight. Fixed Acrobat & Warrior stance issues. * Fixed Chris' Derp
This commit is contained in:
parent
2fdc59c0a5
commit
5f0dace64e
4 changed files with 28 additions and 14 deletions
|
@ -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);
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue