-
Notifications
You must be signed in to change notification settings - Fork 69
Components
The following components are available:
-
{text: "...", icon: "image.png", ping: 0}
The basic component represents the content of one slot in the tab list. It offers the following options:
-
The
icon
option controls the icon on the left of the slot.Icons in the tab list are a feature which has been added in Minecraft version 1.8. You will not see them using older clients. They are not available in offline mode either.
The
icon
option can be set to one of the following:-
The name of a 8x8 pixel
.png
file you saved in theheads/
directory, e.g.colors/blue.png
. -
A player name or uuid. You can set this to a name which does not belong to player to save bandwidth/ see random alex or steve skins. See http://www.reddit.com/r/MinecraftHeads/comments/1m1s0g/official_heads_made_by_mojang_marc/ for cool skins/heads.
-
-
The
ping
option configures the ping bar on the right of the slot. The following table shows the effect of different ping values:Value Description Image < 0 crossed out ping bar 0 - 149 five bars 150 - 299 four bars 300 - 599 three bars 600 - 999 two bars > 1000 one bar -
The
left
option sets the text displayed in the slot with alignment to the left. You can use theleft
,center
andright
options simultaneously, to have different pieces of text with different alignment in the same slot. You can use Formatting codes using the§
or the&
sign. You can display information using placeholders. -
The
center
option sets the text displayed in the slot with alignment to the middle. You can use theleft
,center
andright
options simultaneously, to have different pieces of text with different alignment in the same slot. You can use Formatting codes using the§
or the&
sign. You can display information using placeholders. -
The
right
option sets the text displayed in the slot with alignment to the right. You can use theleft
,center
andright
options simultaneously, to have different pieces of text with different alignment in the same slot. You can use Formatting codes using the§
or the&
sign. You can display information using placeholders. -
The
text
option controls the text displayed in the slot. You can use Formatting codes using the§
or the&
sign. You can display information using placeholders.Notice: Instead of using the
text
andalignment
options we recommend you use the newerleft
,center
andright
options which allow you to have multiple pieces of text with different alignment in the same slot. -
The
alignment
can be used to change the text alignment. It can be set toLEFT
,CENTER
orRIGHT
.Example:
{text: "Centered text", icon: "image.png", ping: 0, alignment: CENTER}
Or to do right bound text:
{text: "At the right", icon: "image.png", ping: 0, alignment: RIGHT}
Notice: Instead of using the
text
andalignment
options we recommend you use the newerleft
,center
andright
options which allow you to have multiple pieces of text with different alignment in the same slot. -
The
longText
option allows specifying what happens if the text is too long to fit the slot. It can be set toDISPLAY_ALL
,CROP
,CROP_2DOTS
orCROP_3DOTS
. The default isDISPLAY_ALL
which will display the text anyway. The other options cut off part of the text to make it fit an will eventually append 2 or 3 dots depending on which option you chose.The following table shows the different values you can use for the
longText
option:Value Result DISPLAY_ALL
CROP
CROP_2DOTS
CROP_3DOTS
Example:
{text: "${player vault_prefix}${player name}", longText: CROP_2DOTS}
-
-
This
!animated
component makes it possible to create animated slots. To create an animation you need to provide a list of components of which the plugin displays one at a time and moves on to the next after the given time period. It has the following options which can be customized:-
The
components
option is a list of other components. Typically, each of those represents the content a single slot. The!animated
component will display one of those at a time. -
The
interval
option is the time (in seconds) after which the plugin will move to the next slot. -
The
randomize
option can be set to eithertrue
orfalse
. Not setting it has the same effect as setting it tofalse
. Whenrandomize
is set totrue
the different components will be displayed in random order, otherwise they will be cycled through from top to bottom.
Schema:
!animated components: <List of Components> interval: <Number> randomize: <true/false>
Example:
- !animated interval: 1.5 components: - {text: "&cBalance: &6${viewer vault_balance 1.2}", icon: "default/balance.png", ping: 0} - {text: "&cRank: &6${viewer vault_primary_group}", icon: "default/rank.png", ping: 0} - {text: "&cPing: ${viewer_colored_ping}ms", icon: "default/ping.png", ping: 0}
-
-
The
!conditional
component can dynamically change the content of the tab list. Depending on whether the given condition is fulfilled it is displays one of two replacements. It has the following options:-
The
condition
option is a boolean expression deciding which replacement is used. You can use placeholders and compare them using operators such as=
,<
or>
to create the condition. -
The
true
option must be set to a component (or list of components) that is displayed if the condition is fulfilled. -
The
false
option must be set to a component (or list of components) that is displayed if the condition evaluated tofalse
.
Schema:
!conditional condition: <Expression> true: <Component or List of Components> false: <Component or List of Components>
Example: The example shows how you can display whether a server is online. It also changes the icon of the slot.
!conditional condition: ${server:survival online} == true true: {text: "&bSurvival: &aONLINE", icon: "colors/green.png", ping: 0} false: {text: "&bSurvival: &cOFFLINE", icon: "colors/red.png", ping: 0}
Additional Information: Expression Syntax
-
-
The
!players
component provides a simple way of adding players to the tab list. The following options can be used to customize the!players
component.-
The
playerSet
option selects which players to display on the tab list.If you want to change which players the tab list displays, e.g. so it only displays players in a specific group, do the following:
- Create a player set containing the players you want to display. Check out the Player Sets wiki page for more information.
- Set
playerSet
to the name of the player set you created in step i.
-
The
playerOrder
option specifies the order in which players are displayed on the tab list. Have a look at the Player Order wiki page for more information. -
The
playerComponent
option controls the text displayed in player slots. You can use placeholders to display nicknames, prefixes and suffixes and otherwise change the appearance of the player name.Note that when using placeholders you should use the
player
variant of the placeholder. -
The
morePlayersComponent
option is a custom slot that is displayed if there is not enough space on the tab list to display all of the players: -
The
fillSlotsVertical
option can be used to change the order in which slots are filled. The following screenshot illustrates the effect:fillSlotsVertical: false
fillSlotsVertical: true
Not using the
fillSlotsVertical
option has the same effect as setting it to false. If it is not present in your config file and you want to use it all you have to do is to add thefillSlotsVertical: true
line to the options of the!players
component. -
The
minSize
option specifies the minimum number of slots to be used by the!players
component. If there are less players than the number specified byminSize
, the plugin will add some empty slots after the players, such that the!players
component usesminSize
slots. -
The
maxSize
option specifies the maximum number of slots to be used by the!players
component. If there are more players than can be displayed inmaxSize
slots, the plugin will not display all of them, make use of themorePlayersComponent
to indicate that there are more players and use exactlymaxSize
slots.Setting
minSize
andmaxSize
to the same value guarantees that the!players
component always uses the same number of slots. It will not change its size depending on the number of players. That way the component after the!players
component always appears at the same location. This can be useful for some layouts, especially in conjunction with the!table
component.
Schema:
!players playerSet: <String> playerOrder: <String> playerComponent: <Component or list of components> morePlayersComponent: <Component or list of components> fillSlotsVertical: <true/false> minSize: <Number> maxSize: <Number>
Example:
!players playerSet: all_players playerOrder: "vault_primary_group_weight asc, name asc" playerComponent: "${player name}" morePlayersComponent: {text: "... and ${other_count} others", icon: "default/players.png", ping: 0}
-
-
The
!players_by_server
component adds players to the tab list grouping them by server as seen in the default config. You can customize its appearance using the following options:-
The
playerSet
option selects which players to display on the tab list.If you want to change which players the tab list displays, e.g. so it only displays players in a specific group, do the following:
- Create a player set containing the players you want to display. Check out the Player Sets wiki page for more information.
- Set
playerSet
to the name of the player set you created in step i.
-
The
playerOrder
option specifies the order in which players are displayed on the tab list. Have a look at the Player Order wiki page for more information. -
Determines the order of the servers. Possible values for
serverOrder
arealphabetically
,playercount
,online
andcustom
. Multiple orderings can be chained by separating the with a comma, just the way it works withplayerOrder
. -
Specifies the server order if you used
custom
in theserverOrder
option.Example using
serverOrder: custom
:!players_by_server playerSet: all_players serverOrder: custom customServerOrder: [spawn, survival, creative] # ...
-
The
serverHeader
option specifies a list of custom slots displayed for each server above the players on that server. Here two special placeholders${server}
and${server_player_count}
can be used to display the name of the server and the number of players on it. -
The
serverFooter
specifies a list of custom slots displayed for each server below the players on that server. Here two special placeholders${server}
and${server_player_count}
can be used to display the name of the server and the number of players on it. -
The
serverFooter
specifies a list of custom slots displayed between each pair of two servers. -
The
showServers
controls which servers should appear on the tablist:Option Description ALL
All servers are displayed ONLINE
Only running servers are displayed NON_EMPTY
Only non empty servers are displayed Example:
ALL NON_EMPTY -
The
mergeServers
option makes two or more servers appear as a single server. This is useful e.g. if you have multiple lobby servers.Schema:
mergeServers: <group name>: [<server name>, <servername>, ...] <group name>: [<server name>, <servername>, ...] ...
Example on using the
mergeServers
option:Before After !players_by_server playerSet: all_players serverHeader: "> &b${server}" mergeServers: lobby: [lobby0, lobby1] # ...
-
Setting the
prioritizeViewerServer
option totrue
tells the plugin to use more space for displaying the viewer's server. Instead of using an equal amount of slots for each server, the viewer's server will be given more space if required to fit all its players. TheprioritizeViewerServer
is enabled by default. -
The
hiddenServers
option specifies a list of servers which will not be displayed.Example on using the
hiddenServers
option:!players_by_server playerSet: all_players showServers: ALL hiddenServers: [hub, private] # ...
-
The
playerComponent
option controls the text displayed in player slots. You can use placeholders to display nicknames, prefixes and suffixes and otherwise change the appearance of the player name.Note that when using placeholders you should use the
player
variant of the placeholder. -
The
morePlayersComponent
option is a custom slot that is displayed if there is not enough space on the tab list to display all of the players: -
The
fillSlotsVertical
option can be used to change the order in which slots are filled. The following screenshot illustrates the effect:fillSlotsVertical: false
fillSlotsVertical: true
Not using the
fillSlotsVertical
option has the same effect as setting it to false. If it is not present in your config file and you want to use it all you have to do is to add thefillSlotsVertical: true
line to the options of the!players_by_server
component. -
The
minSizePerServer
option specifies the minimum number of slots to be used for each server. This includes theserverHeader
, the players, themorePlayersComponent
and theserverFooter
. -
The
maxSizePerServer
option specifies the maximum number of slots to be used for a single server. This includes theserverHeader
, the players, themorePlayersComponent
and theserverFooter
. -
The
minSize
option specifies the minimum number of slots to be used by the!players_by_server
component. If there are less players than the number specified byminSize
, the plugin will add some empty slots after the players, such that the!players_by_server
component usesminSize
slots. -
The
maxSize
option specifies the maximum number of slots to be used by the!players_by_server
component. If there are more players than can be displayed inmaxSize
slots, the plugin will not display all of them, make use of themorePlayersComponent
to indicate that there are more players and use exactlymaxSize
slots.Setting
minSize
andmaxSize
to the same value guarantees that the!players_by_server
component always uses the same number of slots. It will not change its size depending on the number of players. That way the component after the!players_by_server
component always appears at the same location. This can be useful for some layouts, especially in conjunction with the!table
component.
Schema:
!players_by_server playerSet: <String> playerOrder: <String> serverOrder: <String> customServerOrder: <List of servers> serverHeader: <List of Components> serverFooter: <List of Components> serverSeparator: <List of Components> showServers: <ALL, ONLINE, NON_EMPTY> mergeServers: <group name>: [<server name>, <servername>, ...] prioritizeViewerServer: <true/false> hiddenServers: <List of servers> playerComponent: <Component or list of components> morePlayersComponent: <Component or list of components> fillSlotsVertical: <true/false> minSizePerServer: <Number> maxSizePerServer: <Number> minSize: <Number> maxSize: <Number>
Example:
!players_by_server playerSet: global playerOrder: "vault_primary_group_weight asc, name asc" serverOrder: "playercount,alphabetically" serverHeader: - {text: "&e&n${server}&f&o (${server_player_count}):", icon: "colors/yellow.png", ping: 0} showServers: NON_EMPTY playerComponent: "${player name}" morePlayersComponent: {text: "&7... and &e${other_count} &7others", icon: "colors/gray.png", ping: 0}
-
-
The
!table
component makes it possible to configure the columns of the tab list individually. It has two options:-
The
columns
option is a map. It maps each column number to a list of components that will be displayed in that column. The columns numbers start from0
(left most column). You use two columns to display single component by joining the column number with a-
, e.g. using1-2
as key. -
The
size
option specifies the number of slots used by the!table
component. This option is optional, and should not be required by most users. When used this must be a multiple of the number of columns.
Schema:
!table size: <Number> columns: <Column number(s)>: <List of Components>
Example:
!table columns: 0: - "Content of the first column" - "..." 1-2: - "This" - "goes" - "to" - "the" - "second" - "and" - "third" - "column" 3: - "Content of the fourth column" - "..."
-
-
The
!spacer
component can be used to fill part of the tab list with empty slots. Those slots will use the icon defined by thedefaultIcon
option and the ping set by thedefaultPing
option. The!spacer
component does not have any configurable options.Schema:
!spacer
Example showing the use of the
!spacer
component with some context:size: 20 components: - {text: "Top-most slot", icon: "colors/gold.png", ping: 0} - !spacer - {text: "Slot at the very bottom", icon: "colors/gold.png", ping: 0}
-
The
!container
component acts as a wrapper for the other components it contains. It allows changing the order in which those components fill the slots of the tab list as well setting a minimum/ maximum for the number of slots used by those components.The
!container
component has the following options:-
The
fillSlotsVertical
option can be used to change the order in which slots are filled. Not using thefillSlotsVertical
option has the same effect as setting it to false. -
The
minSize
option specifies the minimum number of slots to be used. If the components inside the!container
component use less slots than specified byminSize
, the plugin will add empty slots. -
The
maxSize
option specifies the maximum number of slots that can be used by the components inside the!container
component. -
The
components
option specifies the components inside the!container
component.
Schema:
!container fillSlotsVertical: <true/false> minSize: <Number> maxSize: <Number> components: <List of Components>
Example showing the use of the
!container
component with some context:components: - !container fillSlotsVertical: true components: - "Admins:" - !players playerSet: admins playerComponent: "${player vault_prefix}${player name}${afk_tag}" morePlayersComponent: {text: "&7... and &e${other_count} &7others", icon: "colors/gray.png", ping: 0} - - !players playerSet: non_admins playerComponent: "${player vault_prefix}${player name}${afk_tag}" morePlayersComponent: {text: "&7... and &e${other_count} &7others", icon: "colors/gray.png", ping: 0}
-
Next: Player Order