Use isTouchingWater for NoSprintingPacket

main
Charlotte Som 2022-02-14 07:08:43 +00:00
parent 3265282b30
commit f21aadb117
1 changed files with 2 additions and 2 deletions

View File

@ -11,12 +11,12 @@ class NoSprintingPacket : Feature("No Sprinting Packet", FeatureCategory.PLAYER)
on { event: SendPacketEvent ->
val (packet) = event
if (packet is ClientCommandC2SPacket) {
if (packet.mode == ClientCommandC2SPacket.Mode.START_SPRINTING && !player.isSubmergedInWater) {
if (packet.mode == ClientCommandC2SPacket.Mode.START_SPRINTING && !player.isTouchingWater) {
event.cancel()
}
}
}
hiddenInOverlay = true
}
}