From 0a2342c015b310172f933df765d8651013c26f16 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 8 Dec 2024 00:14:48 +0100 Subject: Fix crash in kuudra chest detection --- src/main/kotlin/moe/nea/ledger/modules/KuudraChestDetection.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/kotlin/moe/nea/ledger/modules/KuudraChestDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/KuudraChestDetection.kt index bc072ba..8d0dc7b 100644 --- a/src/main/kotlin/moe/nea/ledger/modules/KuudraChestDetection.kt +++ b/src/main/kotlin/moe/nea/ledger/modules/KuudraChestDetection.kt @@ -24,7 +24,7 @@ class KuudraChestDetection : ChestDetection() { lateinit var minecraft: Minecraft fun hasKey(keyItem: ItemId): Boolean { val p = minecraft.thePlayer ?: return false - return p.inventory.mainInventory.any { it.getInternalId() == keyItem } + return p.inventory.mainInventory.any { it?.getInternalId() == keyItem } } @SubscribeEvent -- cgit