Improve double jump

This commit is contained in:
2025-04-20 23:07:23 -07:00
parent d91ae8be1a
commit 83a9a75861

View File

@@ -13,12 +13,12 @@ class PlayerToggleFlightListener : Listener {
val player: Player = event.getPlayer()
if (!player.isFlying && player.gameMode == GameMode.ADVENTURE && player.inventory.heldItemSlot != 7) {
val direction = player.location.direction.normalize()
val direction = player.location.direction.setY(0).normalize()
event.isCancelled = true
player.allowFlight = false
direction.multiply(1.25f)
direction.setY(1)
direction.multiply(1.75f)
direction.setY(1.25f)
player.velocity = direction
player.playSound(player.location, Sound.ENTITY_ENDER_DRAGON_FLAP, 1.0f, 1.0f)
}