mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-08-05 12:03:17 +00:00
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:
parent
0599d39da9
commit
3ee2663690
1 changed files with 10 additions and 8 deletions
|
@ -732,14 +732,16 @@ public class PKListener implements Listener {
|
||||||
Player targetplayer = (Player) e.getEntity();
|
Player targetplayer = (Player) e.getEntity();
|
||||||
if (GeneralMethods.canBendPassive(sourceplayer.getName(), Element.Chi)) {
|
if (GeneralMethods.canBendPassive(sourceplayer.getName(), Element.Chi)) {
|
||||||
if (GeneralMethods.isBender(sourceplayer.getName(), Element.Chi) && e.getCause() == DamageCause.ENTITY_ATTACK && e.getDamage() == 1) {
|
if (GeneralMethods.isBender(sourceplayer.getName(), Element.Chi) && e.getCause() == DamageCause.ENTITY_ATTACK && e.getDamage() == 1) {
|
||||||
if (GeneralMethods.isWeapon(sourceplayer.getItemInHand().getType()) && !plugin.getConfig().getBoolean("Properties.Chi.CanBendWithWeapons")) {
|
if (ChiMethods.isChiAbility(GeneralMethods.getBoundAbility(sourceplayer)) {
|
||||||
return;
|
if (GeneralMethods.isWeapon(sourceplayer.getItemInHand().getType()) && !plugin.getConfig().getBoolean("Properties.Chi.CanBendWithWeapons")) {
|
||||||
}
|
return;
|
||||||
if (ChiPassive.willChiBlock(sourceplayer, targetplayer)) {
|
}
|
||||||
if (GeneralMethods.getBoundAbility(sourceplayer) != null && GeneralMethods.getBoundAbility(sourceplayer).equalsIgnoreCase("Paralyze")) {
|
if (ChiPassive.willChiBlock(sourceplayer, targetplayer)) {
|
||||||
new Paralyze(sourceplayer, targetplayer);
|
if (GeneralMethods.getBoundAbility(sourceplayer) != null && GeneralMethods.getBoundAbility(sourceplayer).equalsIgnoreCase("Paralyze")) {
|
||||||
} else {
|
new Paralyze(sourceplayer, targetplayer);
|
||||||
ChiPassive.blockChi(targetplayer);
|
} else {
|
||||||
|
ChiPassive.blockChi(targetplayer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (sourceplayer.getLocation().distance(targetplayer.getLocation()) <= plugin.getConfig().getDouble("Abilities.Chi.RapidPunch.Distance") && Methods.getBoundAbility(sourceplayer) == null) {
|
// if (sourceplayer.getLocation().distance(targetplayer.getLocation()) <= plugin.getConfig().getDouble("Abilities.Chi.RapidPunch.Distance") && Methods.getBoundAbility(sourceplayer) == null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue