diff options
| author | Brady <thatgravyboat@gmail.com> | 2024-05-08 08:30:59 -0230 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-08 13:00:59 +0200 |
| commit | f9ce2fa19a1178fd9f2e2728d09ac5acd299d69f (patch) | |
| tree | c344555d1a09f27b74347413f828df71fe95767b /src/main/java/at/hannibal2/skyhanni/data/hypixel | |
| parent | 49d918a5d01f102796c2ef52a26e69a41892eb8f (diff) | |
| download | skyhanni-f9ce2fa19a1178fd9f2e2728d09ac5acd299d69f.tar.gz skyhanni-f9ce2fa19a1178fd9f2e2728d09ac5acd299d69f.tar.bz2 skyhanni-f9ce2fa19a1178fd9f2e2728d09ac5acd299d69f.zip | |
Backend: Text API (#1718)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/hypixel')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt index 35c1e8cd1..4190b2e9d 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt @@ -13,7 +13,6 @@ import at.hannibal2.skyhanni.features.bingo.BingoAPI import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatFilter import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager import at.hannibal2.skyhanni.features.misc.compacttablist.AdvancedPlayerList -import at.hannibal2.skyhanni.utils.ChatComponentUtils import at.hannibal2.skyhanni.utils.ComponentMatcherUtils.matchStyledMatcher import at.hannibal2.skyhanni.utils.ComponentSpan import at.hannibal2.skyhanni.utils.LorenzUtils @@ -21,6 +20,7 @@ import at.hannibal2.skyhanni.utils.StringUtils import at.hannibal2.skyhanni.utils.StringUtils.applyFormattingFrom import at.hannibal2.skyhanni.utils.StringUtils.cleanPlayerName import at.hannibal2.skyhanni.utils.StringUtils.toCleanChatComponent +import at.hannibal2.skyhanni.utils.chat.Text import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import com.google.gson.JsonArray import com.google.gson.JsonNull @@ -85,7 +85,7 @@ class PlayerNameFormatter { if (!isEnabled()) return event.chatComponent = StringUtils.replaceIfNeeded( event.chatComponent, - ChatComponentUtils.text("§bCo-Op > ") { + Text.text("§bCo-Op > ") { appendSibling(nameFormat(event.authorComponent)) appendText("§f: ") appendSibling(event.messageComponent.intoComponent()) @@ -98,7 +98,7 @@ class PlayerNameFormatter { if (!isEnabled()) return event.chatComponent = StringUtils.replaceIfNeeded( event.chatComponent, - ChatComponentUtils.text("§2Guild > ") { + Text.text("§2Guild > ") { appendSibling(nameFormat(event.authorComponent, guildRank = event.guildRank)) appendText("§f: ") appendSibling(event.messageComponent.intoComponent()) @@ -111,7 +111,7 @@ class PlayerNameFormatter { if (!isEnabled()) return event.chatComponent = StringUtils.replaceIfNeeded( event.chatComponent, - ChatComponentUtils.text("§9Party §8> ") { + Text.text("§9Party §8> ") { appendSibling(nameFormat(event.authorComponent)) appendText("§f: ") appendSibling(event.messageComponent.intoComponent()) @@ -123,7 +123,7 @@ class PlayerNameFormatter { fun onPrivateChat(event: PrivateMessageChatEvent) { if (!isEnabled()) return event.chatComponent = - StringUtils.replaceIfNeeded(event.chatComponent, ChatComponentUtils.text("§d${event.direction}") { + StringUtils.replaceIfNeeded(event.chatComponent, Text.text("§d${event.direction}") { appendText(" ") appendSibling(nameFormat(event.authorComponent)) appendText("§f: ") @@ -135,7 +135,7 @@ class PlayerNameFormatter { @SubscribeEvent fun onPlayerShowItemChat(event: PlayerShowItemChatEvent) { if (!isEnabled()) return - event.chatComponent = StringUtils.replaceIfNeeded(event.chatComponent, ChatComponentUtils.text("") { + event.chatComponent = StringUtils.replaceIfNeeded(event.chatComponent, Text.text("") { appendSibling( nameFormat( event.authorComponent, |
