aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-04-27 11:42:59 +0200
committerGitHub <noreply@github.com>2024-04-27 11:42:59 +0200
commitc3be57c318b3966992e40959470245c5d3f6eb04 (patch)
tree48294ec52d6c65f4a3c083bf505903e1ed6c7e29 /src/main/java/at/hannibal2/skyhanni
parent772d5ae117e27663f8089844596119ae4d0ba543 (diff)
downloadskyhanni-c3be57c318b3966992e40959470245c5d3f6eb04.tar.gz
skyhanni-c3be57c318b3966992e40959470245c5d3f6eb04.tar.bz2
skyhanni-c3be57c318b3966992e40959470245c5d3f6eb04.zip
Fix: Discord profile level error (#1548)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt
index b217aded1..eef6e4efa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt
@@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.data.PetAPI
import at.hannibal2.skyhanni.data.ScoreboardData
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.garden.GardenAPI.getCropType
+import at.hannibal2.skyhanni.features.misc.compacttablist.AdvancedPlayerList
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -165,20 +166,7 @@ enum class DiscordStatus(private val displayMessageSupplier: (() -> String?)) {
}),
PROFILE({
- val player = LorenzUtils.getPlayerName()
-
- val tabData = TabListData.getTabList()
- val levelRegex = Regex("""\[(\d{1,3})] $player""")
- var sbLevel = ""
-// SkyBlock Level: [999] on Lemon
- for (line in tabData) {
- if (line.contains(player)) {
- val colorlessLine = line.removeColor()
- sbLevel = levelRegex.find(colorlessLine)!!.groupValues[1]
- break
- }
- }
-
+ val sbLevel = AdvancedPlayerList.tabPlayerData[LorenzUtils.getPlayerName()]?.sbLevel?.toString() ?: "?"
var profile = "SkyBlock Level: [$sbLevel] on "
profile += when {