aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-01 17:43:00 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-01 17:43:00 +0200
commite9f20ac0d212964ae57dcdbacd025045d208391e (patch)
tree3f27c27ce63628972722ac18dfe000e37ec5234f /src
parenta004600ace92bd722e289c06864eac1ad103d477 (diff)
downloadskyhanni-e9f20ac0d212964ae57dcdbacd025045d208391e.tar.gz
skyhanni-e9f20ac0d212964ae57dcdbacd025045d208391e.tar.bz2
skyhanni-e9f20ac0d212964ae57dcdbacd025045d208391e.zip
Workaround to prevent crash in GardenComposterInventoryFeatures
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt
index 538b971e9..a85b73363 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt
@@ -44,7 +44,13 @@ class GardenComposterInventoryFeatures {
LorenzUtils.error("§c[SkyHanni] Could not read item '$line'")
continue
}
- val lowestBin = NEUItems.getPrice(NEUItems.getInternalName(itemName))
+ val internalName = NEUItems.getInternalNameOrNull(itemName)
+ if (internalName == null) {
+ LorenzUtils.chat("§c[SkyHanni] Error reading internal name for item '$itemName' " +
+ "(in GardenComposterInventoryFeatures)")
+ continue
+ }
+ val lowestBin = NEUItems.getPrice(internalName)
val price = lowestBin * amount
fullPrice += price
val format = NumberUtil.format(price)