Skip to content

Commit ebdaca3

Browse files
fix: update double jump logic to prevent jumps when player is airborne
1 parent d7522f5 commit ebdaca3

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/main/kotlin/dev/slne/surf/lobby/listener/DoubleJumpListener.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,8 @@ object DoubleJumpListener : Listener {
4141
val now = System.currentTimeMillis()
4242
val last = lastJump[uuid]
4343

44-
if (player.velocity.y > 0) {
45-
return
46-
}
47-
4844
@Suppress("DEPRECATION")
49-
if (player.isOnGround) {
50-
lastJump[uuid] = now
45+
if (!player.isOnGround) {
5146
return
5247
}
5348

0 commit comments

Comments
 (0)