mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Remove WaterSpout if Bloodbended / Paralyzed
This commit is contained in:
parent
94fe066aa9
commit
d1b6497fe6
1 changed files with 46 additions and 39 deletions
|
@ -10,6 +10,8 @@ import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
|
import chiblocking.Paralyze;
|
||||||
|
|
||||||
import com.projectkorra.ProjectKorra.Flight;
|
import com.projectkorra.ProjectKorra.Flight;
|
||||||
import com.projectkorra.ProjectKorra.Methods;
|
import com.projectkorra.ProjectKorra.Methods;
|
||||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||||
|
@ -101,6 +103,10 @@ public class WaterSpout {
|
||||||
|
|
||||||
public static void spout(Player player) {
|
public static void spout(Player player) {
|
||||||
WaterSpout spout = instances.get(player);
|
WaterSpout spout = instances.get(player);
|
||||||
|
if (Bloodbending.isBloodbended(player) || Paralyze.isParalyzed(player)) {
|
||||||
|
instances.get(player).remove();
|
||||||
|
} else {
|
||||||
|
|
||||||
player.setFallDistance(0);
|
player.setFallDistance(0);
|
||||||
player.setSprinting(false);
|
player.setSprinting(false);
|
||||||
// if (player.getVelocity().length() > threshold) {
|
// if (player.getVelocity().length() > threshold) {
|
||||||
|
@ -140,6 +146,7 @@ public class WaterSpout {
|
||||||
instances.get(player).remove();
|
instances.get(player).remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static int spoutableWaterHeight(Location location, Player player) {
|
private static int spoutableWaterHeight(Location location, Player player) {
|
||||||
WaterSpout spout = instances.get(player);
|
WaterSpout spout = instances.get(player);
|
||||||
|
|
Loading…
Reference in a new issue