aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-12-08 00:14:48 +0100
committerLinnea Gräf <nea@nea.moe>2024-12-08 00:14:48 +0100
commit0a2342c015b310172f933df765d8651013c26f16 (patch)
treeca0dc2b60244cd2816e6400cbbe399a1d1c68560 /src/main/kotlin/moe/nea/ledger
parent3acf36fbd07686431b8fbb5484f1f70b52651dc5 (diff)
downloadLocalTransactionLedger-0a2342c015b310172f933df765d8651013c26f16.tar.gz
LocalTransactionLedger-0a2342c015b310172f933df765d8651013c26f16.tar.bz2
LocalTransactionLedger-0a2342c015b310172f933df765d8651013c26f16.zip
Fix crash in kuudra chest detection
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger')
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/KuudraChestDetection.kt2
1 files changed, 1 insertions, 1 deletions
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