mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 16:05:01 +00:00
Fixes SwiftKick
Fixes SwiftKick being able to be used when player hasn't / isn't jumping
This commit is contained in:
parent
8ee81c9c0e
commit
8b3b3c9739
1 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@ import com.projectkorra.projectkorra.ability.ChiAbility;
|
|||
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
@ -33,6 +34,9 @@ public class SwiftKick extends ChiAbility {
|
|||
remove();
|
||||
return;
|
||||
}
|
||||
if (player.getLocation().subtract(0, 0.5, 0).getBlock().getType() != Material.AIR) {
|
||||
return;
|
||||
}
|
||||
DamageHandler.damageEntity(target, damage, this);
|
||||
if (target instanceof Player && ChiPassive.willChiBlock(player, (Player) target)) {
|
||||
ChiPassive.blockChi((Player) target);
|
||||
|
|
Loading…
Reference in a new issue