Sorting afk players - montlikadani/TabList GitHub Wiki
With supported resources such as Essentials, you have the ability to sort AFK players who have at least one group specified.
You have two options to sort AFK players:
- Sort them in the last row of player list
- Sort them by priorities if the AFK players have at least 1 group
Sort to last row of player list
To make this work, enable the following options in the config.yml
file of TabList:
change-prefix-suffix-in-tablist.enable
afk-status.enable
afk-status.sort-last
After a reload, if a player is in AFK and has at least a group, the player will automatically be at the bottom of the player list.
Setting afk priorities for groups individually
With the release of TabList (starting from v5.6.3) you can set sorting priorities individually for AFK players whose in specific groups.
In order to make this work you need some things:
change-prefix-suffix-in-tablist.enable
-> trueafk-status.enable
-> trueafk-status.show-player-group
-> trueafk-status.sort-last
-> false
To set custom priorities, go to groups.yml
and add the afk-sort-priority
option to the groups where you want the groups to be sorted when the players are in AFK status.
Conditions
- The
sort-priority
option will no longer have an effect if the player's is in AFK andafk-sort-priority
are specified - The value must be greater than or equal to 0 (>= 0)
- The higher the value, the lower it will be on the list compared to the others
- If the value is 0 or 1, the player will be sorted to the top of the player list
Example of demonstrating this
admin:
prefix: '&6[&4Admin&6]&f '
sort-priority: 5
afk-sort-priority: 1
moderator:
prefix: '&bmod '
default:
prefix: '&7[Default] '
sort-priority: 1
afk-sort-priority: 6
In this case, players in the admin
group will be sorted at the top of the list, but players in the default
group will be sorted at the bottom of the list. The moderator
group is intact and will not be sorted anywhere.