diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index cf0192ca4..43799dc50 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -150,17 +150,24 @@ object ItemUtils { var matcher = patternInFront.matcher(input) if (matcher.matches()) { val itemName = matcher.group("name") - val amount = matcher.group("amount")?.replace(",", "")?.toInt() ?: 1 - val pair = Pair(itemName, amount) - itemAmountCache[input] = pair - return pair + if (!itemName.contains("ยง8x")) { + val amount = matcher.group("amount")?.replace(",", "")?.toInt() ?: 1 + val pair = Pair(itemName, amount) + itemAmountCache[input] = pair + return pair + } } var string = input.trim() val color = string.substring(0, 2) string = string.substring(2) matcher = patternBehind.matcher(string) - if (!matcher.matches()) return Pair(null, 0) + if (!matcher.matches()) { + println("") + println("input: '$input'") + println("string: '$string'") + return Pair(null, 0) + } val itemName = color + matcher.group("name").trim() val amount = matcher.group("amount")?.replace(",", "")?.toInt() ?: 1 |