diff --git a/expansion/Cheat Prevention/src/main/java/com/SirBlobman/combatlogx/expansion/cheat/prevention/listener/ListenerFlight.java b/expansion/Cheat Prevention/src/main/java/com/SirBlobman/combatlogx/expansion/cheat/prevention/listener/ListenerFlight.java index 6e46c20d2..4044016a5 100644 --- a/expansion/Cheat Prevention/src/main/java/com/SirBlobman/combatlogx/expansion/cheat/prevention/listener/ListenerFlight.java +++ b/expansion/Cheat Prevention/src/main/java/com/SirBlobman/combatlogx/expansion/cheat/prevention/listener/ListenerFlight.java @@ -16,7 +16,6 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageEvent; -import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerToggleFlightEvent; public class ListenerFlight implements Listener { @@ -69,7 +68,12 @@ public void onDamage(EntityDamageEvent e) { Entity entity = e.getEntity(); if(!(entity instanceof Player)) return; - + + Player player = (Player) entity; + UUID uuid = player.getUniqueId(); + if(!this.preventFallDamage.contains(uuid)) return; + e.setCancelled(true); + this.preventFallDamage.remove(uuid); } } \ No newline at end of file