diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index ed7b94770..d485e2c99 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -92,10 +92,9 @@ object SkyBlockItemModifierUtils { inline val ItemStack.cachedData get() = (this as ItemStackCachedData).skyhanni_cachedData fun ItemStack.getPetLevel(): Int { - UtilsPatterns.petLevelPattern.matchMatcher(this.displayName) { - return group("level").toInt() - } - return 0 + return UtilsPatterns.petLevelPattern.matchMatcher(this.displayName) { + group("level").toInt() + } ?: 0 } fun ItemStack.getMaxPetLevel() = if (this.getInternalName() == "GOLDEN_DRAGON;4".asInternalName()) 200 else 100 |