diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-02 00:21:41 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-02 00:21:41 +0100 |
| commit | 08907c4b0b26f605a8c7a8ff846dd15351d5a168 (patch) | |
| tree | 6172b1ec81899cc47bf060d4dffe9ae2a3240311 /src/main/java/at/hannibal2/skyhanni/data | |
| parent | 1779ecd642e5720589442d79f094a19178dc564b (diff) | |
| download | skyhanni-08907c4b0b26f605a8c7a8ff846dd15351d5a168.tar.gz skyhanni-08907c4b0b26f605a8c7a8ff846dd15351d5a168.tar.bz2 skyhanni-08907c4b0b26f605a8c7a8ff846dd15351d5a168.zip | |
Add support for tier 1 minions in the minion craft helper.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/HyPixelData.kt | 13 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HyPixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HyPixelData.kt index d6b1506a3..9d620f565 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HyPixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HyPixelData.kt @@ -26,6 +26,8 @@ class HyPixelData { var stranded = false var bingo = false + var profile = "" + fun readSkyBlockArea(): String { return ScoreboardData.sidebarLinesFormatted() .firstOrNull { it.startsWith(" §7⏣ ") } @@ -61,12 +63,15 @@ class HyPixelData { val message = event.message.removeColor().lowercase() if (message.startsWith("your profile was changed to:")) { - val stripped = message.replace("your profile was changed to:", "").replace("(co-op)", "").trim() - ProfileJoinEvent(stripped).postAndCatch() + val newProfile = message.replace("your profile was changed to:", "").replace("(co-op)", "").trim() + profile = newProfile + ProfileJoinEvent(newProfile).postAndCatch() } if (message.startsWith("you are playing on profile:")) { - val stripped = message.replace("you are playing on profile:", "").replace("(co-op)", "").trim() - ProfileJoinEvent(stripped).postAndCatch() + val newProfile = message.replace("you are playing on profile:", "").replace("(co-op)", "").trim() + if (profile == newProfile) return + profile = newProfile + ProfileJoinEvent(newProfile).postAndCatch() } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt b/src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt index ec7f0b5ae..502bc2023 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt @@ -14,7 +14,7 @@ class SendTitleHelper { private var endTime = 0L fun sendTitle(text: String, duration: Int) { - display = text + display = "§f$text" endTime = System.currentTimeMillis() + duration } } |
