From 64d7552b5a1ea356f44204ab1f7c690658678944 Mon Sep 17 00:00:00 2001 From: Spider <29214314+spide-r@users.noreply.github.com> Date: Sat, 7 Nov 2020 21:27:15 -0600 Subject: [PATCH] [fix] Flight crash in singleplayer (#1565) Entering a singleplayer world with flight enabled causes this crash. https://hastebin.com/tufariposu.log --- .../me/zeroeightsix/kami/module/modules/movement/Flight.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/movement/Flight.kt b/src/main/java/me/zeroeightsix/kami/module/modules/movement/Flight.kt index 5a843c159..2872d92ea 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/movement/Flight.kt +++ b/src/main/java/me/zeroeightsix/kami/module/modules/movement/Flight.kt @@ -47,6 +47,7 @@ object Flight : Module() { init { listener { + 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() } } -} \ No newline at end of file +}