mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
Fixed healingwaters shift functionality
This commit is contained in:
parent
de454ac88d
commit
4701e5f9cf
1 changed files with 8 additions and 10 deletions
|
@ -36,22 +36,20 @@ public class HealingWaters extends HealingAbility {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void heal(Player player) {
|
private static void heal(Player player) {
|
||||||
if (inWater(player)) {
|
if (inWater(player)) {
|
||||||
if (player.isSneaking()) {
|
if (player.isSneaking()) {
|
||||||
Entity entity = GeneralMethods.getTargetedEntity(player, getRadius());
|
Entity entity = GeneralMethods.getTargetedEntity(player, getRadius());
|
||||||
if (entity instanceof LivingEntity && inWater(entity)) {
|
if (entity == null) {
|
||||||
if (getShiftRequired() && player.isSneaking()) {
|
giveHP(player);
|
||||||
giveHPToEntity((LivingEntity) entity);
|
} else {
|
||||||
} else if (!getShiftRequired()) {
|
giveHPToEntity((LivingEntity) entity);
|
||||||
giveHPToEntity((LivingEntity) entity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getShiftRequired() && player.isSneaking()) {
|
if (getShiftRequired()) {
|
||||||
giveHP(player);
|
return;
|
||||||
} else if (!getShiftRequired()) {
|
} else {
|
||||||
giveHP(player);
|
giveHP(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue