Skip to content

Commit

Permalink
Improvement + Fix: Profile Type in Custom Scoreboard (#2810)
Browse files Browse the repository at this point in the history
  • Loading branch information
j10a1n15 authored Oct 26, 2024
1 parent 0507e8b commit 26835af
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ public String toString() {
@ConfigEditorDropdown
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
Expand Down
Original file line number Diff line number Diff line change
@@ -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?
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 26835af

Please sign in to comment.