aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-08-16 11:16:54 +0200
committerGitHub <noreply@github.com>2024-08-16 11:16:54 +0200
commit571d0ed6eca959a18032509844d5237df6a9e601 (patch)
treecbac763923cebfbb32e623a85da07a3fc4a73f69 /src/main/java/at/hannibal2/skyhanni/features
parent050e3325c7ebe7b6218618262e6ed955232c870d (diff)
downloadskyhanni-571d0ed6eca959a18032509844d5237df6a9e601.tar.gz
skyhanni-571d0ed6eca959a18032509844d5237df6a9e601.tar.bz2
skyhanni-571d0ed6eca959a18032509844d5237df6a9e601.zip
Fix: Item Pickup Log null items (#2351)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt10
1 files changed, 3 insertions, 7 deletions
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