diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 43799dc50..557950fbe 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -152,7 +152,7 @@ object ItemUtils { val itemName = matcher.group("name") if (!itemName.contains("ยง8x")) { val amount = matcher.group("amount")?.replace(",", "")?.toInt() ?: 1 - val pair = Pair(itemName, amount) + val pair = Pair(itemName.trim(), amount) itemAmountCache[input] = pair return pair } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index 1ce7c9e22..563e8976e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -30,6 +30,9 @@ object NEUItems { if (internalName == "HAY_BALE") { internalName = "HAY_BLOCK" } + if (internalName == null) { + throw Error("getInternalName is null for '$itemName'") + } itemNameCache[itemName] = internalName return internalName } |