Formatting¶
This page explains specific points of formatting in AdvancedServerList, be it text formatting or special quirks of YAML formatting.
If you have questions, don't hesitate to join the M.O.S.S. Discord and ask in the #asl-support
channel.
Text Formatting¶
AdvancedServerList uses the MiniMessage Text Formatting for all formatting of text options (motd
, playerCount -> hover
and playerCount -> text
).
It supports all available formatting tags with a few exceptions and limitations.
Note
Please note that the available tags in MiniMessage depend heavily on the version used on the Server or Proxy.
While AdvancedServerList downloads MiniMessage for BungeeCord, is it using the built-in version on Paper and Velocity. Due to this could the version used be older than the one the plugin is compiled against.
Why MiniMessage and not &
/§
?¶
The reason to only support MiniMessage and not the so-called legacy color and formatting codes can be boiled down to 3 specific reasons:
- MiniMessage tags are more clear on what they do.
<aqua>
makes it clear that it colors the text while&b
is not as clear on that matter. -
MiniMessage allows easier combination of color and formatting codes.
MiniMessage "remembers" what colors and formatting you applied, meaning if you close a tag and a previous one was set before it, that will continue.Example
Below is a comparison of the same text made in MiniMessage and Color codes.
<aqua>Hello <green><bold>World! <red>How</bold> are</red> you?
# We add &c after "How" to avoid a "bold space" &bHello &a&lWorld! &c&lHow&c are &ayou?
-
MiniMessage adds easier support for advanced features (RGB colors, gradients, etc.)
With MiniMessage is it significantly more easy to use more advanced features such as gradients, rgb colors and similar.
While legacy colors have a form of RGB support is the format weird to look at and gradients become a mess. This is even worse when including bold for specific characters.Example
Below is an example of a Gradient starting at
#084CFB
() and ending at#ADF3FD
().<gradient:#084CFB:#ADF3FD>Hello World!</gradient>
TCFBHÃDFBeĨDFBlA7EFClA8FFCo BB0FCWCC1FCoCD2FDr	DE2FDl&#ADF3FDd
In general is MiniMessage a lot easier to manage and read as legacy color codes, as their appearance is more distinct from normal text.
Exceptions and Limitations¶
Due to the situation MiniMessage is used in are not all of its features available to use.
Below is a list of all features that cannot be used by AdvancedServerList, or can only be used by it under specific conditions.
Feature | Tag | Supported? |
---|---|---|
RGB Colors | <#rrggbb> |
Only works properly on motd and will be downsampled to the closest named color for the other options. |
RGB Gradients | <gradient:#rrggbb:#rrggbb> |
Only works properly on motd and will be downsampled to the closest named color for the other options. |
Click Actions | <click:_type_:_value_> |
Tag will be rendered, but clicking the text won't do anything. |
Hover Actions | <hover:_type_:_value_> |
Tag will be rendered, but hovering the text won't show anything. |
Insertions | <insertion:_value_> |
Tag will be rendered, but clicking the text won't do anything. |
Font | <font:_font_> |
May work with the default fonts (default , alt and uniform ) and with custom ones should the client already have it. |
Selector | <selector:_sel_> |
Tag will be rendered, but clicking the text won't do anything. |
Score | <score:_name_:_objective_> |
Will not render due to requiring the player to be on the server. |
Pride | <pride[:_flag_]> |
Only works if the server (Paper) or Proxy (Velocity) use v4.18.0 of MiniMessage. BungeeCord is unaffected due to downloading it. |
Yaml Formatting¶
YAML has some special quirks that require attention when editing the file.
Such quirks include features such as...
- Reading
~
andnull
as literal null values. - Reading
>
and|
as multi-line indicators.
To avoid this should you always surround text values with single ('
) or double quotes ("
) to force the YAML parser to see those as Strings.
Note on Single quotes inside text
Using single quotes, the YAML parser may get confused when the text itself also contains a single quote.
As an example 'You're banned'
would mess up the value because the '
in You're
is understood as the end of the String.
To avoid this issue, do one of the following:
- Surround the text with Double quotes instead of Single quotes (
"You're banned"
) - Use two single quotes (
''
) inside the text every time you want to display a single quote character ('You''re banned'
)