Improve double jump
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user