Profiles¶
AdvancedServerList allows you to create multiple so called Server List Profiles.
A Server List Profile is a YAML file located in the plugin's profiles
folder. Each Server List Profile allows you to modify one or multiple aspects of your server's display in a Multiplayer Server list.
Additionally can Conditions and a Priority be set to set when a specific profile should be displayed to a player.
Required Options¶
For a Server List Profile to be valid, will it require the following options to be set:
- A valid
priority
option with a single, whole number. - At least one of the following options:
profiles
with at least one of the below options set.motd
with at least one line to display.favicon
with a non-empty String.playerCount -> hidePlayers
with valuetrue
.playerCount -> hover
with at least one line to display.playerCount -> text
with a non-empty String.
Priority¶
The Priority option allows you to define what Server List Profile should be chosen first.
The plugin will go highest value to lowest value and will select the first Profile that has a condition
returning true
.
Should AdvancedServerList not find any profile with a positive condition will it not modify the server list for the players.
Note
It is important to note that should no condition
option be set will it default to true
, meaning that a profile with priority 1 and no condition will be chosen over a profile with priority 0 and a condition, even if said condition also returns true.
Condition¶
The condition
option allows you to define specific requirements that need to be met to display the profile in question.
Not setting this option, or setting it to an empty String (condition: ''
), will result in true
being returned.
The condition option can hold one or multiple expressions. The Expression system is explained on the Expressions page.
Example
priority: 0
condition: '${player isWhitelisted}'
motd:
- '<grey>Hello ${player name}!'
- '<grey>Nice to see you.'
Profiles¶
The profile
option allows you to define a list of all other options, with the exception of priority
, condition
or itself.
When multiple entries are defined will AdvancedServerList randomly select one.
Should an option exist in the file itself (i.e. motd
) but not in the selected profiles entry will it be used. This allows you to randomize only one aspect of a Server List Profile while keeping all other options the same.
Example
priority: 0
profiles:
- motd: # You can also use ['<rainbow>Line1</rainbow>','<rainbow:!>Line 2</rainbow>']
- '<rainbow>Line 1</rainbow>'
- '<rainbow:!>Line 2</rainbow>'
playerCount:
text: '<green><bold>Awesome!'
- playerCount:
text: '<yellow><bold>Also Awesome!'
# This MOTD is used when the second profiles entry is selected.
motd:
- '<rainbow:2>Line A</rainbow>'
- '<rainbow:!2>Line B</rainbow>'
Motd¶
The motd
option allows you to alter the "Message of the day" that is being displayed on a server in the multiplayer screen.
Please see the Formatting for all supported formatting options.
Multiple, randomly selected, MOTDs can be displayed by using the profiles
option.
Example
priority: 0
motd:
- '<rainbow:2>Rainbow Gradient</rainbow>'
- '<rainbow:!2>|||||||||||||||||||||||||||||||||||||</rainbow>'
Favicon¶
The favicon
option can be used to define an image to display in the server list.
The Value can be one of three possible options, each being checked for in order:
- A URL pointing to an image file. The URL needs to start with
https://
to work. - A PNG filename, including
.png
file extension, matching a PNG file in thefavicons
folder. - A player name or UUID, or a placeholder that resolves into one.
Note that for the name/UUID, the site https://mc-heads.net is being used.
Use the URL option with the ${player uuid}
placeholder if you want to use another service.
Example
priority: 0
# Hides the MOTD for demonstration purposes
motd:
- '<grey>'
- '<grey>'
# Placeholder resolves to UUID of Andre_601
favicon: '${player uuid}'
PlayerCount¶
The playerCount
option contains various other options that are used to modify the player count (The text next to the ping icon that shows the online and max players of a server).
HidePlayers¶
The playerCount -> hidePlayers
option takes a boolean (true
or false
) to set whether the player count should be hidden or not.
When set to true will the player count be replaced with ???
.
In addition are the playerCount -> text
and playerCount -> hover
options ignored.
If you want to not show any text at all, set this option to false
(or remove it) and instead use the playerCount -> text
option.
Example
priority: 0
# Hides the MOTD for demonstration purposes
motd:
- '<grey>'
- '<grey>'
playerCount:
hidePlayers: true
Hover¶
The playerCount -> hover
option allows you to define lines of text to show when a player hovers over the player count with their cursor.
Notes
Only basic color and formatting codes such as <aqua>
and <bold>
are accepted. Hex colors will be downsampled to the closest supported color.
Example
priority: 0
# Hides the MOTD for demonstration purposes
motd:
- '<grey>'
- '<grey>'
playerCount:
hover:
- '<grey>Line 1'
- '<aqua>Line 2'
- '<gold>Line 3'
Text¶
The playerCount -> text
option allows you to define a custom text to display instead of the usual <online>/<max>
.
Please take note of the following caveats:
- The plugin won't automatically add the
<online>/<max>
back to the text you set. Instead you'll have to use${server playersOnline}/${server playersMax}
to recreate this. - The override is done by using the "outdated server" text displayed when a client pings a server that is not compatible. This means that the ping icon will appear crossed out and your server will be seen as "outdated" by the client (When hovering over the ping icon). This can't be avoided nor fixed by the plugin.
If you want to not show any text, just use a single color (i.e. text: '<grey>'
) to do so.
This option only supports basic colors and no HEX colors.
Example
priority: 0
# Hides the MOTD for demonstration purposes
motd:
- '<grey>'
- '<grey>'
playerCount:
text: '<yellow><bold>Cool text!'
ExtraPlayers¶
${server playersMax}
placeholder (Except in condition).The playerCount -> extraPlayers
option contains settings for the "extra players" feature, which adds X to the current online player count and sets it as the server's max player count.
Enabled¶
Enables the extraPlayers feature.
Use the playerCount -> extraPlayers -> amount
option to set how much to add to the max players count.
Amount¶
playerCount -> hidePlayers
is enabled.The playerCount -> extraPlayers -> amount
option defines how much should be added to the current online player count to then use as max player count.
Example: Setting this option to 1
while currently 10 players are online will result in 10/11
being displayed on the player count (Assuming it is not being overriden by the playerCount -> text
option).
You can use placeholders that resolve into numbers for this option.
Example
priority: 0
# Hides the MOTD for demonstration purposes
motd:
- '<grey>'
- '<grey>'
playerCount:
extraPlayers:
enabled: true
amount: 1
MaxPlayers¶
playerCount -> extraPlayers
be enabled.${server playersMax}
placeholder (Except in condition).The playerCount -> maxPlayers
option is similar in nature to the playerCount -> extraPlayers
option, with the difference that the number set is being used as the max player count, instead of adding it together with the online player count first.
Enabled¶
Enables the maxPlayers feature.
Use the playerCount -> maxPlayers -> amount
option to set the max player count itself.
Amount¶
playerCount -> hidePlayers
is enabled.The playerCount -> maxPlayers -> amount
option defines the number to use as the server's max players count.
Unlike the playerCount -> extraPlayers -> amount
option does this one not first add the current online player count to the number to then set.
You can use placeholders that resolve into numbers for this option.
Example
priority: 0
# Hides the MOTD for demonstration purposes
motd:
- '<grey>'
- '<grey>'
playerCount:
maxPlayers:
enabled: true
amount: -1
OnlinePlayers¶
playerCount -> extraPlayers
The playerCount -> onlinePlayers
option contains settings to enable and set the number of players online on the server.
Enabled¶
Enables the online players feature.
Use the playerCount -> onlinePlayers -> amount
option to set the online players value itself.
Amount¶
Sets the number to display as the server's only player count.
You can use placeholders that resolve into numbers for this option.