Skip to content

Commit

Permalink
fix: minor block-handling when climbing
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Jan 22, 2025
1 parent 659c40d commit 3ffd379
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object ClimbBehaviour : Listener {
@EventHandler
fun BlockPlaceEvent.onBlockPlace() {
val uuid = player.uniqueId
if (!player.isSneaking && uuid.isClimbing) isCancelled = true
if ((!player.isSneaking || player.isInClimbableBlock) && uuid.isClimbing) isCancelled = true
if (uuid in cooldown) uuid.climbCooldown = conf.walljumpCooldown
}

Expand Down Expand Up @@ -91,6 +91,8 @@ object ClimbBehaviour : Listener {
}
player.flySpeed = 0.03f
}

if ((!player.isSneaking || player.isInClimbableBlock) && uuid.isClimbing) isCancelled = true
}

@EventHandler
Expand Down

0 comments on commit 3ffd379

Please sign in to comment.