summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/gui
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-17 17:00:00 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-17 17:00:00 +0200
commit5aae03a0e27f361ec4133ac1fda43a3d4e72061e (patch)
tree2bff3c537df082383e2aca4ca95553bb5b49943d /src/main/java/at/hannibal2/skyhanni/features/gui
parent05fd8b3dbe18ac8e23f2adc4a0a792d6435095d6 (diff)
downloadskyhanni-5aae03a0e27f361ec4133ac1fda43a3d4e72061e.tar.gz
skyhanni-5aae03a0e27f361ec4133ac1fda43a3d4e72061e.tar.bz2
skyhanni-5aae03a0e27f361ec4133ac1fda43a3d4e72061e.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/gui')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt4
2 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt
index 36774faa5..bb06b0517 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt
@@ -11,7 +11,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.formatDouble
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeResets
import at.hannibal2.skyhanni.utils.StringUtils.trimWhiteSpace
-import at.hannibal2.skyhanni.utils.TabListData
import java.util.regex.Pattern
object CustomScoreboardUtils {
@@ -34,10 +33,6 @@ object CustomScoreboardUtils {
else -> "§e"
}
- fun getTablistFooter(): String {
- return TabListData.getFooter().removeResets()
- }
-
internal fun Number.formatNum(): String = when (displayConfig.numberFormat) {
DisplayConfig.NumberFormat.SHORT -> NumberUtil.format(this)
DisplayConfig.NumberFormat.LONG -> this.addSeparators()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
index 6cde610cb..f30ac50ba 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
@@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.StringUtils.anyMatches
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.matches
+import at.hannibal2.skyhanni.utils.StringUtils.removeResets
import at.hannibal2.skyhanni.utils.TabListData
import java.util.function.Supplier
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern as SbPattern
@@ -399,7 +400,8 @@ private fun getSpookyLines() = buildList {
getSbLines().firstOrNull { SbPattern.spookyPattern.matches(it) }?.let { add(it) } // Time
add("§7Your Candy: ")
add(
- CustomScoreboardUtils.getTablistFooter()
+ TabListData.getFooter()
+ .removeResets()
.split("\n")
.firstOrNull { it.startsWith("§7Your Candy:") }
?.removePrefix("§7Your Candy:") ?: "§cCandy not found"