aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-03-26 20:19:52 +0100
committerGitHub <noreply@github.com>2024-03-26 20:19:52 +0100
commitf02cea10acdaa98948fa33545db6d805852e334d (patch)
treea87e7b8bf77d00e606ff05f4be04e1bd626bd2db
parent2f8737997d2539772456932ada630417d5a48b24 (diff)
downloadskyhanni-f02cea10acdaa98948fa33545db6d805852e334d.tar.gz
skyhanni-f02cea10acdaa98948fa33545db6d805852e334d.tar.bz2
skyhanni-f02cea10acdaa98948fa33545db6d805852e334d.zip
Fix: Fixed Powder color in Custom Scoreboard (#1275)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
index 7129315db..4f9d64965 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
@@ -688,32 +688,40 @@ private fun getQuiverShowWhen(): Boolean {
}
private fun getPowderDisplayPair() = buildList {
- val powderTypes = listOf(
- "§2Mithril" to getGroupFromPattern(
+ val powderTypes: List<Triple<String, String, String>> = listOf(
+ Triple("Mithril", "§2", getGroupFromPattern(
TabListData.getTabList(),
ScoreboardPattern.mithrilPowderPattern,
"mithrilpowder"
- ).formatNum(),
- "§dGemstone" to getGroupFromPattern(
+ ).formatNum()),
+ Triple("Gemstone", "§d", getGroupFromPattern(
TabListData.getTabList(),
ScoreboardPattern.gemstonePowderPattern,
"gemstonepowder"
- ).formatNum(),
- "§bGlacite" to getGroupFromPattern(
+ ).formatNum()),
+ Triple("Glacite", "§b", getGroupFromPattern(
TabListData.getTabList(),
ScoreboardPattern.glacitePowderPattern,
"glacitepowder"
- ).formatNum(),
+ ).formatNum())
)
- if (informationFilteringConfig.hideEmptyLines && powderTypes.all { it.second == "0" }) {
+ if (informationFilteringConfig.hideEmptyLines && powderTypes.all { it.third == "0" }) {
add("<hidden>" to HorizontalAlignment.LEFT)
} else {
add("§9§lPowder" to HorizontalAlignment.LEFT)
- for ((type, value) in powderTypes) {
- if (value != "0") {
- add(" §7- §f$type: $value" to HorizontalAlignment.LEFT)
+ if (displayConfig.displayNumbersFirst) {
+ for ((type, color, value) in powderTypes) {
+ if (value != "0") {
+ add(" §7- $color$value $type" to HorizontalAlignment.LEFT)
+ }
+ }
+ } else {
+ for ((type, color, value) in powderTypes) {
+ if (value != "0") {
+ add(" §7- §f$type: $color$value" to HorizontalAlignment.LEFT)
+ }
}
}
}