diff --git a/src/main/kotlin/xyz/lncvrt/galaxylobby/event/PlayerToggleFlightListener.kt b/src/main/kotlin/xyz/lncvrt/galaxylobby/event/PlayerToggleFlightListener.kt index d62a4d8..b8fe6e4 100644 --- a/src/main/kotlin/xyz/lncvrt/galaxylobby/event/PlayerToggleFlightListener.kt +++ b/src/main/kotlin/xyz/lncvrt/galaxylobby/event/PlayerToggleFlightListener.kt @@ -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) }