aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-01 01:29:14 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-01 01:29:14 +0200
commit1bad17906dc6f5f1f65b48300404dec4c3b67043 (patch)
treec9b2098f741a266bfdb89267bfce5630d87e69f0 /src
parent6194809a0ff90285efa36dcf54c1f378353a4196 (diff)
downloadskyhanni-1bad17906dc6f5f1f65b48300404dec4c3b67043.tar.gz
skyhanni-1bad17906dc6f5f1f65b48300404dec4c3b67043.tar.bz2
skyhanni-1bad17906dc6f5f1f65b48300404dec4c3b67043.zip
Fixed bug with visitors that want an item only one time
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt3
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
}