-
Notifications
You must be signed in to change notification settings - Fork 2
Home
You can download the expansion on PlaceholderAPI's eCloud at https://api.extendedclip.com/expansions/playerlist/
Head over to PlaceholderAPI's config file and search for the playerlist section
-
playerlist: # Text shown when the index is out of range offline-text: "Offline" # Separator for filters such as PERMISSION, WORLD and PLACEHOLDER argument-separator: ',' # Here's where you defined all your lists lists: # The name of this list is "staff" staff: # We only want online staff members type: ONLINE # If we're part of the list, we want to be included included: true filters: # Does the player have the group.staff permission? - PERMISSION:group.staff # Can you see the player? (usually managed by vanish plugins) - CANSEE all: # We want all players that ever joined the server type: ALL included: true sorting-types: # Sorting players that are online first - PLACEHOLDER:%player_online%:yes,no custom: type: CUSTOM # Your custom list of elements (supports placeholders) input: "4, 2, 9, 5" # Character(s) that separates each element in the input separator: ", " # Filters are supported if the input contains player names. sorting-types: # Sorting elements starting with the lowest number (in this case: 2, 4, 5, 9) - LOW_TO_HIGH groups: myGroup: # name of the group gap: 2 # slots gap between each list lists: staff: # list name title: "Staff Members (%amount%)" max: 10 # will display a max of 10 remaining: "... and %remaining% more" all: title: "All Players (%amount%)"
-
%playerlist_<name>_<list|amount|#>%(see Output Types)
-
ALL- Matches all players -
ONLINE- Matches online players -
OFFLINE- Matches offline players
| Filters | Description | Valid Lists | Note |
|---|---|---|---|
PERMISSION:<permission> |
Matches all players that have the defined permission | ONLINE | Supports multiple permissions separated by , (Ex: perm1,perm2) |
WORLD:<world> |
Matches all players in the specified world | ONLINE | Supports multiple worlds separated by , (Ex: world1,world2) |
NEARBY:<distance> |
Matches all players in the defined radius in blocks | Online | |
WHITELISTED |
Matches all players in the whitelist. | ONLINE, OFFLINE, ALL | |
BANNED |
Matches all players banned from the server | OFFLINE | ONLINE and ALL type work but for obvious reason don't exactly matter |
CANSEE |
Matches all players you can see | ONLINE | This feature checks players which aren't hidden from you in game by other plugins such as vanish plugins. |
PLACEHOLDER:<input1>=<output1>,<input2>=<output2>,... |
Matches all players which the placeholder defined in the input returns the specified output (only 1 condition must be met by the player) | ONLINE, OFFLINE, ALL | Not all placeholders support offline players, this is not an issue with this expansion but with the author of the placeholder's expansion. I can't do anything about that. |
VERSION:<protocolVersion> |
Matches all players with the version specified | Online | To specify versions, you have to use the Version Numbers defined here. Supports multiple versions separated by a + and range of versions with - (both can be mixed!) Ex: ver1-ver3+ver5. Requires ViaVersion. |
GAMEMODE:<gamemode> |
ONLINE | List of online players in the specified gamemode |
| Types | Description |
|---|---|
A_TO_Z:<placeholder> |
Sorts alphabetically |
Z_TO_A:<placeholder> |
Sorts reverse alphabetically |
LOW_TO_HIGH:<placeholder> |
Sorts numerically |
HIGH_TO_LOW:<placeholder> |
Sorts reverse numerically |
PLACEHOLDER:<placeholder>:<output1>,<output2>,... |
Sorts by the placeholder's output in the defined order |
Note: Aside from the PLACEHOLDER sorting type, when no placeholder is provided, the name of the player/element of the custom list will be used instead.
-
list- Returns a list of players separated by, -
amount- Returns amount of players matched -
<number>- Returns the player at the specified index, starts from 0.
Groups can have both a list of, well, player lists, and gaps (amount of empty slots separating each list) When adding a player list to a group, you can specify its title (text that will be shown before listing the players), a max amount of players to display, as well as a text with the amount of remaining players in case you defined a max amount.
If you're using LuckPerms (which most people do and should), you can easily check if a player has a group by checking the group. permission.
Head over to your PlaceholderAPI config.yml file and find the playerlist section, then add the following:
playerlist:
lists:
my_awesome_group_list:
type: ONLINE
included: true
filters:
- PERMISSION:group.<groupName>
- CANSEENow you can use %playerlist_my_awesome_group_list_amount% to get the amount of players that have your group! (don't forget to replace <groupName> by your actual group without the <>, you can also change my_awesome_group_list to whatever you want)
Note: Players with OP or the * permission will always be included, as well as people that have multiple groups.
If you instead want the player's primary group or just not include OP/* permission, or you're using another plugin aside from LuckPerms, use the PLACEHOLDER filter and check if %vault_group% is equal to your group (e.g. replace the PERMISSION:group.<groupName> line by PLACEHOLDER:%vault_group%=<groupName>)
This requires the WorldGuard expansion to be installed
playerlist:
lists:
spawn:
type: ONLINE
included: true
filters:
- PLACEHOLDER:%worldguard_region_name%=spawn
- CANSEE playerlist:
groups:
tablist: # name of the group
gap: 1 # slots gap between each list
lists:
staff:
title: "Staff Members (%amount%)"
max: 10 # will display a max of 10
remaining: "... and %remaining% more"
vips:
title: "VIPs (%amount%)"
max: 0 # 0 = no max, redundant
players:
title: "Members (%amount%)"
lists:
staff:
type: ONLINE
included: true
filters:
- PERMISSION:group.staff
- CANSEE
vips:
type: ONLINE
included: true
filters:
- "!PERMISSION:group.staff" # We don't count staff members who may also have the VIP group
- PERMISSION:group.vip
- CANSEE
players:
type: ONLINE
included: true
filters:
- "!PERMISSION:group.staff" # Same thing, but for both staff members & VIPs
- "!PERMISSION:group.vip"
- CANSEEYou can then either use %playerlist_group_tablist_amount% to get the combined amount of players of all the lists within the group, or %playerlist_group_tablist_<index>% to get a player/list title at a specific index. Can be used with TAB's layout feature for dynamic playerlists sizes!
If you want it in TAB's layouts: (it's pretty long lol)
fixed-slots:
- 1|%playerlist_group_tablist_0%
- 2|%playerlist_group_tablist_1%
- 3|%playerlist_group_tablist_2%
- 4|%playerlist_group_tablist_3%
- 5|%playerlist_group_tablist_4%
- 6|%playerlist_group_tablist_5%
- 7|%playerlist_group_tablist_6%
- 8|%playerlist_group_tablist_7%
- 9|%playerlist_group_tablist_8%
- 10|%playerlist_group_tablist_9%
- 11|%playerlist_group_tablist_10%
- 12|%playerlist_group_tablist_11%
- 13|%playerlist_group_tablist_12%
- 14|%playerlist_group_tablist_13%
- 15|%playerlist_group_tablist_14%
- 16|%playerlist_group_tablist_15%
- 17|%playerlist_group_tablist_16%
- 18|%playerlist_group_tablist_17%
- 19|%playerlist_group_tablist_18%
- 20|%playerlist_group_tablist_19%
- 21|%playerlist_group_tablist_20%
- 22|%playerlist_group_tablist_21%
- 23|%playerlist_group_tablist_22%
- 24|%playerlist_group_tablist_23%
- 25|%playerlist_group_tablist_24%
- 26|%playerlist_group_tablist_25%
- 27|%playerlist_group_tablist_26%
- 28|%playerlist_group_tablist_27%
- 29|%playerlist_group_tablist_28%
- 30|%playerlist_group_tablist_29%
- 31|%playerlist_group_tablist_30%
- 32|%playerlist_group_tablist_31%
- 33|%playerlist_group_tablist_32%
- 34|%playerlist_group_tablist_33%
- 35|%playerlist_group_tablist_34%
- 36|%playerlist_group_tablist_35%
- 37|%playerlist_group_tablist_36%
- 38|%playerlist_group_tablist_37%
- 39|%playerlist_group_tablist_38%
- 40|%playerlist_group_tablist_39%
- 41|%playerlist_group_tablist_40%
- 42|%playerlist_group_tablist_41%
- 43|%playerlist_group_tablist_42%
- 44|%playerlist_group_tablist_43%
- 45|%playerlist_group_tablist_44%
- 46|%playerlist_group_tablist_45%
- 47|%playerlist_group_tablist_46%
- 48|%playerlist_group_tablist_47%
- 49|%playerlist_group_tablist_48%
- 50|%playerlist_group_tablist_49%
- 51|%playerlist_group_tablist_50%
- 52|%playerlist_group_tablist_51%
- 53|%playerlist_group_tablist_52%
- 54|%playerlist_group_tablist_53%
- 55|%playerlist_group_tablist_54%
- 56|%playerlist_group_tablist_55%
- 57|%playerlist_group_tablist_56%
- 58|%playerlist_group_tablist_57%
- 59|%playerlist_group_tablist_58%
- 60|%playerlist_group_tablist_59%
- 61|%playerlist_group_tablist_60%
- 62|%playerlist_group_tablist_61%
- 63|%playerlist_group_tablist_62%
- 64|%playerlist_group_tablist_63%
- 65|%playerlist_group_tablist_64%
- 66|%playerlist_group_tablist_65%
- 67|%playerlist_group_tablist_66%
- 68|%playerlist_group_tablist_67%
- 69|%playerlist_group_tablist_68%
- 70|%playerlist_group_tablist_69%
- 71|%playerlist_group_tablist_70%
- 72|%playerlist_group_tablist_71%
- 73|%playerlist_group_tablist_72%
- 74|%playerlist_group_tablist_73%
- 75|%playerlist_group_tablist_74%
- 76|%playerlist_group_tablist_75%
- 77|%playerlist_group_tablist_76%
- 78|%playerlist_group_tablist_77%
- 79|%playerlist_group_tablist_78%
- 80|%playerlist_group_tablist_79%