diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-01 17:43:00 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-01 17:43:00 +0200 |
commit | e9f20ac0d212964ae57dcdbacd025045d208391e (patch) | |
tree | 3f27c27ce63628972722ac18dfe000e37ec5234f /src/main/java/at/hannibal2 | |
parent | a004600ace92bd722e289c06864eac1ad103d477 (diff) | |
download | skyhanni-e9f20ac0d212964ae57dcdbacd025045d208391e.tar.gz skyhanni-e9f20ac0d212964ae57dcdbacd025045d208391e.tar.bz2 skyhanni-e9f20ac0d212964ae57dcdbacd025045d208391e.zip |
Workaround to prevent crash in GardenComposterInventoryFeatures
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt | 8 |
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) |