aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/elements/ScoreboardElementProfile.kt17
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/events/ScoreboardEventBroodmother.kt2
3 files changed, 21 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java
index b54d7519d..26c6b125e 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java
@@ -150,6 +150,11 @@ public class DisplayConfig {
public RenderUtils.HorizontalAlignment textAlignment = RenderUtils.HorizontalAlignment.LEFT;
@Expose
+ @ConfigOption(name = "Show Profile Name", desc = "Show profile name instead of the type in the profile element.")
+ @ConfigEditorBoolean
+ public boolean showProfileName = false;
+
+ @Expose
@ConfigOption(name = "Date in Lobby Code", desc = "Show the current date infront of the server name, like Hypixel does.")
@ConfigEditorBoolean
public boolean dateInLobbyCode = true;
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/elements/ScoreboardElementProfile.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/elements/ScoreboardElementProfile.kt
index c8a4bc993..2d85d6776 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/elements/ScoreboardElementProfile.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/elements/ScoreboardElementProfile.kt
@@ -1,15 +1,28 @@
package at.hannibal2.skyhanni.features.gui.customscoreboard.elements
import at.hannibal2.skyhanni.data.HypixelData
+import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboardUtils
import at.hannibal2.skyhanni.utils.StringUtils.firstLetterUppercase
// internal and scoreboard
// island change event
object ScoreboardElementProfile : ScoreboardElement() {
- override fun getDisplay() = CustomScoreboardUtils.getProfileTypeSymbol() + HypixelData.profileName.firstLetterUppercase()
+ override fun getDisplay() = buildString {
+ append(CustomScoreboardUtils.getProfileTypeSymbol())
+ if (CustomScoreboard.displayConfig.showProfileName) {
+ append(HypixelData.profileName.firstLetterUppercase())
+ } else {
+ when {
+ HypixelData.ironman -> append("Ironman")
+ HypixelData.stranded -> append("Stranded")
+ HypixelData.bingo -> append("Bingo")
+ else -> append("Normal")
+ }
+ }
+ }
- override val configLine = "§7♲ Blueberry"
+ override val configLine = "§7♲ Ironman"
}
// click: does a command for profile management exist?
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/events/ScoreboardEventBroodmother.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/events/ScoreboardEventBroodmother.kt
index 2d10a1847..3b6a23a18 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/events/ScoreboardEventBroodmother.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/events/ScoreboardEventBroodmother.kt
@@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
// scoreboard
// widget update event
object ScoreboardEventBroodmother : ScoreboardEvent() {
- override fun getDisplay() = TabWidget.BROODMOTHER.lines
+ override fun getDisplay() = TabWidget.BROODMOTHER.lines.map { it.trim() }
override val configLine = "Broodmother§7: §eDormant"