11package dev.slne.surf.surfapi.core.api.messages.builder
22
3+ import dev.slne.surf.surfapi.core.api.messages.*
34import dev.slne.surf.surfapi.core.api.messages.Colors.Companion.DARK_SPACER
45import dev.slne.surf.surfapi.core.api.messages.Colors.Companion.ERROR
56import dev.slne.surf.surfapi.core.api.messages.Colors.Companion.INFO
@@ -11,14 +12,10 @@ import dev.slne.surf.surfapi.core.api.messages.Colors.Companion.SUCCESS
1112import dev.slne.surf.surfapi.core.api.messages.Colors.Companion.VARIABLE_KEY
1213import dev.slne.surf.surfapi.core.api.messages.Colors.Companion.VARIABLE_VALUE
1314import dev.slne.surf.surfapi.core.api.messages.Colors.Companion.WARNING
14- import dev.slne.surf.surfapi.core.api.messages.CommonComponents
1515import dev.slne.surf.surfapi.core.api.messages.CommonComponents.DISCONNECT_HEADER
1616import dev.slne.surf.surfapi.core.api.messages.CommonComponents.DISCORD_LINK
1717import dev.slne.surf.surfapi.core.api.messages.CommonComponents.MAP_SEPERATOR
1818import dev.slne.surf.surfapi.core.api.messages.CommonComponents.TIME_SEPARATOR
19- import dev.slne.surf.surfapi.core.api.messages.NoLowercase
20- import dev.slne.surf.surfapi.core.api.messages.joinToComponent
21- import dev.slne.surf.surfapi.core.api.messages.joinToComponentNewLine
2219import net.kyori.adventure.key.Key
2320import net.kyori.adventure.text.*
2421import net.kyori.adventure.text.event.ClickEvent
@@ -44,6 +41,9 @@ interface SurfComponentBuilder : TextComponent.Builder {
4441 }
4542
4643 fun appendPrefix () = append(PREFIX )
44+ fun appendSurfPrefix () = append(Colors .SURF_PREFIX )
45+ fun appendErrorPrefix () = append(Colors .ERROR_PREFIX )
46+ fun appendWarningPrefix () = append(Colors .WARNING_PREFIX )
4747 fun appendNewPrefixedLine () = appendNewline().appendPrefix()
4848
4949 fun append (block : SurfComponentBuilder .() -> Unit ): SurfComponentBuilder =
@@ -234,6 +234,9 @@ interface SurfComponentBuilder : TextComponent.Builder {
234234 fun darkSpacer (long : Long , vararg decoration : TextDecoration ) =
235235 text(long, DARK_SPACER , * decoration)
236236
237+ fun white (any : Any , vararg decoration : TextDecoration ) =
238+ text(any.toString(), Colors .WHITE , * decoration)
239+
237240 fun ellipsis (color : TextColor ? = SPACER ) = append(CommonComponents .ELLIPSIS .color(color))
238241
239242 fun appendDiscordLink () = append(DISCORD_LINK )
0 commit comments