aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-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 {