aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-22 20:23:10 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-22 20:23:10 +0100
commit91f1580f89f3f62943c7de671158ea8293026f85 (patch)
tree8bd73873cb00a53670caf3d82a07a97630b53f9c /src
parent9afe501f5d7bdeeb91999944d414d6a31445fad2 (diff)
downloadskyhanni-91f1580f89f3f62943c7de671158ea8293026f85.tar.gz
skyhanni-91f1580f89f3f62943c7de671158ea8293026f85.tar.bz2
skyhanni-91f1580f89f3f62943c7de671158ea8293026f85.zip
code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt7
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