Use isTouchingWater for NoSprintingPacket

This commit is contained in:
Charlotte Som 2022-02-14 07:08:43 +00:00
parent 3265282b30
commit f21aadb117

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
}
}