aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt1
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt
index 7967fddba..f10d8fd4c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.chat.playerchat
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.features.dungeon.DungeonMilestonesDisplay
import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager
import net.minecraft.util.ChatComponentText
import net.minecraft.util.IChatComponent
@@ -60,9 +61,6 @@ class PlayerChatModifier {
private fun cutMessage(input: String): String {
var string = input
- //all players same color in chat
- string = string.replace("§r§7: ", "§r§f: ")
-
if (SkyHanniMod.feature.chat.chatFilter) {
if (string.contains("§r§f: ")) {
if (PlayerChatFilter.shouldChatFilter(string)) {
@@ -77,6 +75,11 @@ class PlayerChatModifier {
}
string = string.replace("§(?:7|a|b|6)((?:\\w+){2,16})'s", "§b$1's")
string = string.replace("§(?:7|a|b|6)((?:\\w+){2,16}) (§.)", "§b$1 $2")
+
+ if (!DungeonMilestonesDisplay.isMilestoneMessage(input)) {
+ //all players same color in chat
+ string = string.replace("§r§7: ", "§r§f: ")
+ }
}
if (SkyHanniMod.feature.markedPlayers.highlightInChat) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt
index fa62f39a2..b3581551d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt
@@ -13,7 +13,6 @@ import kotlin.concurrent.fixedRateTimer
class DungeonMilestonesDisplay {
-
companion object {
private var display = ""
var color = ""