From 571d0ed6eca959a18032509844d5237df6a9e601 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:16:54 +0200 Subject: Fix: Item Pickup Log null items (#2351) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt index 6b45d5d9e..55473a2c6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt @@ -229,13 +229,9 @@ object ItemPickupLog { } private fun isBannedItem(item: ItemStack): Boolean { - if (item.getInternalNameOrNull()?.startsWith("MAP") == true) { - return true - } - - if (bannedItemsConverted.contains(item.getInternalNameOrNull())) { - return true - } + val internalName = item.getInternalNameOrNull() ?: return true + if (internalName.startsWith("MAP") == true) return true + if (internalName in bannedItemsConverted) return true if (item.getExtraAttributes()?.hasKey("quiver_arrow") == true) { return true -- cgit