aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabStringType.kt6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt
index 60d2ba77e..c6aa9a510 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt
@@ -173,7 +173,8 @@ object TabListRenderer {
middleX += 8 + 2
}
- val text = if (AdvancedPlayerList.ignoreCustomTabList()) tabLine.text else tabLine.customName
+ var text = if (AdvancedPlayerList.ignoreCustomTabList()) tabLine.text else tabLine.customName
+ if (text.contains("§l")) text = "§r$text"
if (tabLine.type == TabStringType.TITLE) {
minecraft.fontRendererObj.drawStringWithShadow(
text,
@@ -215,7 +216,7 @@ object TabListRenderer {
)
@SubscribeEvent
- fun hideFireFromTheTabListBecauseWhoWantsThose(event: SkipTabListLineEvent) {
+ fun onSkipTablistLine(event: SkipTabListLineEvent) {
if (config.hideFiresales && event.lastSubTitle != null && fireSalePattern.matches(event.lastSubTitle.text)) {
event.cancel()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabStringType.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabStringType.kt
index b6b5c36ab..28f831bfe 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabStringType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabStringType.kt
@@ -11,11 +11,11 @@ enum class TabStringType {
companion object {
fun fromLine(line: String): TabStringType {
- val strippedLine: String = line.removeColor()
- if (strippedLine.startsWith(" ")) {
+ val unformattedLine: String = line.removeColor()
+ if (unformattedLine.startsWith(" ")) {
return TEXT
}
- return if (TabListReader.usernamePattern.matcher(strippedLine).find()) {
+ return if (TabListReader.usernamePattern.matcher(unformattedLine).find()) {
PLAYER
} else {
SUB_TITLE