Profiles - Andre601/AdvancedServerList GitHub Wiki

wiki-moved Wiki moved!

The wiki has been moved to a new location and can be found here: https://docs.andre601.ch/AdvancedServerList

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.

Player

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 uuid} The UUID of the Player. All Yes***
${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

* When set to Yes does the Placeholder require the player to have joined before while ASL was running. Placeholders requiring a cached player won't work if disable_cache is enabled.

** Will default to whatever value is set in unknown_player in the config.yml

*** Will default to whatever value is set in unknwon_player_uuid in the config.yml

Server

Placeholder Notes Platforms
${server playersOnline} The number of online players. All
${server playersMax} The number of players that can join. All
${server host} The domain/IP the player pinged. All

PlaceholderAPI

On the Spigot and Paper version of AdvancedServerList can you use any placeholder offered by PlaceholderAPI using the default %<identifier>_<values>% format.

This option requires the player to be cached, if the placeholder in question requires Player information (i.e. %player_name%).

PlaceholderAPI placeholders can NOT 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.*
<= Checks if X is less than OR equal to Y.*
> Checks if X is larger than Y.*
>= Checks if X is larger than OR equal to Y.*
= Checks if X and Y are equal.
!= Checks if X and Y are NOT equal.

* If the provided value is not a number will it instead use the length of the provided text to compare.

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

Profiles

info Available since v1.10.0

This option allows you to create multiple instances of different settings of the server list profile.
Whenever this option is present will AdvancedServerList take the values of whatever options are present from a randomly selected entry and use it for the server list.

Any non-existing option will be replaced by the option present in the file itself. I.e. if the first entry doesn't have a motd option defined, will the option from the file be used, if present.

Example

priority: 1

profiles:
  - motd:
      - Line 1
      - Line 2
    playerCount:
      text: 'Awesome!'
  - playerCount:
      text: 'Also Awesome'

motd:
  - Line A
  - Line B

The above example may either show a server list entry with MOTD Line 1\nLine 2 and Player count text Awesome! or a server list entry with Line A\nLine B as MOTD and Also Awesome as player count text.

MOTDs

warning Only available in 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

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: []

To display multiple MOTDs, use the Profiles option.

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 This option affects the output of ${server maxPlayers} (Except when used in conditions)

⚠️ **GitHub.com Fallback** ⚠️