Update PKListener.java

- Added check for if player has a chi ability bound before chiblocking (as suggested by Loony), fixes abilities like WaterManipulation and others causing the hit player to be chiblocked.
This commit is contained in:
Simplicitee 2015-08-03 22:17:16 -04:00
parent 0599d39da9
commit 3ee2663690

View file

@ -732,6 +732,7 @@ public class PKListener implements Listener {
Player targetplayer = (Player) e.getEntity();
if (GeneralMethods.canBendPassive(sourceplayer.getName(), Element.Chi)) {
if (GeneralMethods.isBender(sourceplayer.getName(), Element.Chi) && e.getCause() == DamageCause.ENTITY_ATTACK && e.getDamage() == 1) {
if (ChiMethods.isChiAbility(GeneralMethods.getBoundAbility(sourceplayer)) {
if (GeneralMethods.isWeapon(sourceplayer.getItemInHand().getType()) && !plugin.getConfig().getBoolean("Properties.Chi.CanBendWithWeapons")) {
return;
}
@ -742,6 +743,7 @@ public class PKListener implements Listener {
ChiPassive.blockChi(targetplayer);
}
}
}
// if (sourceplayer.getLocation().distance(targetplayer.getLocation()) <= plugin.getConfig().getDouble("Abilities.Chi.RapidPunch.Distance") && Methods.getBoundAbility(sourceplayer) == null) {
// if (Methods.isWeapon(sourceplayer.getItemInHand().getType()) && !plugin.getConfig().getBoolean("Properties.Chi.CanBendWithWeapons")) {
// return;