Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Profiles

Andre_601 edited this page Dec 24, 2022 · 33 revisions

About

Important

This page is about Profiles for v1.6.0 and newer!
For v1.5.3 visit this page.

AdvancedServerList allows you to create multiple "profiles".
A Profile is simply a YAML file that contains a priority, conditions, motd, player list and/or player count.

With the exception of priority are all other settings optional, tho at least one of motd, players or playerCount needs to be set to have a valid profile configuration.

Options


Formatting

The following information can be applied to all text options available, with the exception of conditions not supporting MiniMessage formatting.

MiniMessage

AdvancedServerList uses MiniMessage from Kyori Adventure to format text.
While the MOTD option supports more advanced formatting such as HEX colours, gradients and translatable lines, are only basic color and formatting codes such as <red> or <bold> supported for players and playerCount.

The following MiniMessage features are NOT supported for any kind of config option:

  • Hover Actions (Show text, show item, etc.)
  • Click Actions (Execute command, suggest command, etc.)
  • Custom Fonts (May work, but would require an already active resource pack with the font)

Also, remember that features such as HEX colours only work on a 1.16+ server/proxy and will be downsampled to normal colors on older versions by the Adventure library.

Placeholders

AdvancedServerList supports a placeholder pattern adopted from BungeeTabListPlus, meaning the general format is ${<target> <identifier>}.
Placeholders can be used in all options except for Priority.

Please make sure to read the Notes about possible limitations.

Placeholder Notes Platforms Requires cached player?*
${player name} The name of the player. All Yes**
${player protocol} The protocol version the player uses. All No
${player version} The version the player uses displayed as MC version. Velocity No
${player hasPlayedBefore} Whether the player has played before on the server. Spigot/PaperMC Yes
${player isBanned} Whether the player has been banned from the server. Spigot/PaperMC Yes
${player isWhitelisted} Whether the player has been whitelisted on the server. Spigot/PaperMC Yes
${player uuid} The UUID of the Player. Spigot/PaperMC Yes
${server playersOnline} The number of online players. All No
${server playersMax} The number of players that can join. All No
${server host} The domain/IP the player pinged. All No
Any PlaceholderAPI placeholder*** uses the default %<identifier>_<values>% format. Spigot/PaperMC Yes

*When Yes, requires the player to have joined before while AdvancedServerList was running to have them "cached". If disable_cache in the config.yml was set to true, will these placeholders not work.
**Defaults to the text set in unkown_player in the config.yml when the player hasn't been cached yet.
***Cannot be used in Conditions


Note

In order for a Server List Profile to be considered "valid" will you need to set a Priority AND add AT LEAST one of the following options:

Only when these requirements are met will the server list profile be counted as valid and used.


Priority

Sets the priority for this profile. The value can be any positive whole number.

When checking available profiles will AdvancedServerList go through each in order of priority, starting with the highest number.
It will go through each file until it finds one that has conditions returning true (Default when no conditions are set).

This means if you have a file with priority 0 and a condition that checks if a player uses 758 (MC 1.18) or older and another file with priority 1 and no condition will AdvancedServerList use the second file, even when the said player uses MC 1.18.

Conditions

Allows you to define a collection of conditions that need to be met in order to have the profile displayed.
This setting works best with a higher priority to make sure it is checked first before any other file.

Only when all conditions return true will the profile be shown.

Remove this option or set it to conditions: [] to not have any conditions set (Will default to returning true).

Operants

The following operands are supported:

Operant Description
< Checks if X is less than Y. In the case of non-integers will it simply compare the lengths of each string.
<= Checks if X is less than OR equal to Y. In the case of non-integers will it simply compare the lengths of each string.
> Checks if X is larger than Y. In the case of non-integers will it simply compare the lengths of each string.
>= Checks if X is larger than OR equal to Y. In the case of non-integers will it simply compare the lengths of each string.
= Checks if X and Y are equal.
!= Checks if X and Y are NOT equal.

Important!
Due to how expressions are currently parsed can you only use one operant per entry!

MOTDs

info-svg Available since v1.9.0

Allows you to set a list of MOTDs that AdvancedServerList should select from.
You can use |- for having 2 lines per MOTD (See example below).

The MOTDs support basic colours (i.e. <aqua>), HEX colours (1.16+ only) and gradients using the MiniMessage format.

To not change your default MOTD, remove this option or set it to an empty list (motds: []).

Example:

motds:
  - |-
    MOTD 1 Line 1
    MOTD 1 Line 2
  - |-
    MOTD 2 Line 1
    MOTD 2 Line 2

MOTD

alert-svg This option is deprecated. It may still work, but it is not guaranteed!

info-svg The MOTDs option takes priority if both options are present!

Allows you to set the MOTD to display in the server list.
Unlike MOTDs does this option only allow a single MOTD to be set, where each List entry is another line (Only the first two lines are shown)

The MOTD supports basic colours (i.e. <aqua>), HEX colours (1.16+ only) and gradients using the MiniMessage format.

To not change your default MOTD, remove this option or change it to motd: []

Favicon

Gives you the option to override the favicon with a different one.

You can provide one of three possible options:

  1. A URL pointing to a valid PNG image.
  2. The ${player name} placeholder to display the player's skin (Uses https://mc-heads.net).
  3. Name of a valid PNG file located in the favicons folder. Provided name needs to end with .png.

AdvancedServerList will try to rescale the images to 64x64 pixels, so it's recommended to use an image with these dimensions.

PlayerCount

Contains settings related to the player count (The text next to the ping that displays online players and how many can join at most).

HidePlayers

Whether the player count should be hidden or not.
When this option is set to true will the player count be replaced with ???. Additionally will the text and hover option be ignored.

Hover

Allows you to set a List of lines to display instead of the usual online players when hovering over the player count text.

Only basic colours and formatting options are supported using the MiniMessage format.

Remove this option or set it to hover: [] to not override the displayed Players.

Text

Allows you to override the <online>/<max> text usually displayed on the player count.

Note that using this option will make the server appear as outdated, due to AdvancedServerList modifying the "Outdated Server" message that is usually displayed to provide this feature. This is nothing that can be fixed.

Only basic colours and formatting options are supported using the MiniMessage format.

Remove this option or set it to text: '' to not override the player count.

ExtraPlayers

Contains settings to modify the Max player count.

Enabled

When set to true will the plugin modify the max player count by taking the current number of online players and add amount to it.

Amount

This option only works when Enabled was set to true.

Sets the number to add to the current player count on the server before using it as the new max player count.
Example: When set to 1 will 10 players display as 10/11 and with -1 will it be displayed as 10/9.

info-svg This option affects the output of ${server maxPlayers} (Except when used in conditions

Clone this wiki locally