From 73e662d1149bd6730e3b79ee0ecaed62246a7721 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Wed, 27 Mar 2024 21:55:28 +0100 Subject: Fix: Fixed Server Player Amount not being affected by "display numbers first" (#1285) --- .../gui/customscoreboard/ScoreboardElements.kt | 41 +++++++++++++--------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'src/main/java/at/hannibal2') 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 4f9d64965..6502b8f74 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 @@ -496,7 +496,10 @@ fun getPlayerAmountDisplayPair() = buildList { } else { "" } - add("§7Players: §a${getPlayersOnCurrentServer()}$max" to HorizontalAlignment.LEFT) + if (displayConfig.displayNumbersFirst) + add("§a${getPlayersOnCurrentServer()}$max Players" to HorizontalAlignment.LEFT) + else + add("§7Players: §a${getPlayersOnCurrentServer()}$max" to HorizontalAlignment.LEFT) } private fun getVisitDisplayPair() = @@ -689,21 +692,27 @@ private fun getQuiverShowWhen(): Boolean { private fun getPowderDisplayPair() = buildList { val powderTypes: List> = listOf( - Triple("Mithril", "§2", getGroupFromPattern( - TabListData.getTabList(), - ScoreboardPattern.mithrilPowderPattern, - "mithrilpowder" - ).formatNum()), - Triple("Gemstone", "§d", getGroupFromPattern( - TabListData.getTabList(), - ScoreboardPattern.gemstonePowderPattern, - "gemstonepowder" - ).formatNum()), - Triple("Glacite", "§b", getGroupFromPattern( - TabListData.getTabList(), - ScoreboardPattern.glacitePowderPattern, - "glacitepowder" - ).formatNum()) + Triple( + "Mithril", "§2", getGroupFromPattern( + TabListData.getTabList(), + ScoreboardPattern.mithrilPowderPattern, + "mithrilpowder" + ).formatNum() + ), + Triple( + "Gemstone", "§d", getGroupFromPattern( + TabListData.getTabList(), + ScoreboardPattern.gemstonePowderPattern, + "gemstonepowder" + ).formatNum() + ), + Triple( + "Glacite", "§b", getGroupFromPattern( + TabListData.getTabList(), + ScoreboardPattern.glacitePowderPattern, + "glacitepowder" + ).formatNum() + ) ) if (informationFilteringConfig.hideEmptyLines && powderTypes.all { it.third == "0" }) { -- cgit