mirror of https://github.com/kami-blue/client
[fix] Flight crash in singleplayer (#1565)
Entering a singleplayer world with flight enabled causes this crash. https://hastebin.com/tufariposu.log
This commit is contained in:
parent
2f2815b15c
commit
64d7552b5a
|
@ -47,6 +47,7 @@ object Flight : Module() {
|
|||
|
||||
init {
|
||||
listener<PlayerTravelEvent> {
|
||||
if (mc.player == null) return@listener
|
||||
when (mode.value) {
|
||||
FlightMode.STATIC -> {
|
||||
mc.player.capabilities.isFlying = false
|
||||
|
@ -101,4 +102,4 @@ object Flight : Module() {
|
|||
if (mode.value == FlightMode.PACKET && it.packet is SPacketCloseWindow) it.cancel()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue