diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt index bea8bb294..2422b6f4e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt @@ -245,6 +245,7 @@ object MaxwellAPI { } private fun processStack(stack: ItemStack) { + var foundMagicalPower = false for (line in stack.getLore()) { redstoneCollectionRequirementPattern.matchMatcher(line) { ChatUtils.chat("Seems like you don't have the Requirement for the Accessory Bag yet, setting power to No Power and magical power to 0.") @@ -261,7 +262,7 @@ object MaxwellAPI { val mp = group("mp") magicalPower = mp.formatInt() - return@matchMatcher + foundMagicalPower = true } inventoryPowerPattern.matchMatcher(line) { @@ -274,12 +275,11 @@ object MaxwellAPI { "lore" to stack.getLore(), noStackTrace = true ) - return@matchMatcher } } // If Magical Power isn't in the lore - magicalPower = 0 + if (!foundMagicalPower) magicalPower = 0 } private fun getPowerByNameOrNull(name: String) = powers.find { it == name } |