Skip to content
Tanguy edited this page Mar 30, 2023 · 38 revisions

Download

You can download the expansion on PlaceholderAPI's eCloud at https://api.extendedclip.com/expansions/playerlist/

Usage:

Config and Placeholder Syntaxes

  • 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
  • %playerlist_<name>_<list|amount|#>%

Types:

  • ALL - Matches all players
  • ONLINE - Matches online players
  • OFFLINE - Matches offline players

Filters:

Filters Description Valid Lists Note
PERMISSION:<permission> Matches all players that have the defined permission ONLINE Supports multiple permissions separated by || (Ex: `perm1
WORLD:<world> Matches all players in the specified world ONLINE Supports multiple worlds separated by || (Ex: `world1
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:<text1>||<text2> Matches all players which the placeholder defined in text1 returns the specified output 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

Output Types:

  • list - Returns a list of players separated by ,
  • amount - Returns amount of players matched
  • <integer> - Returns the player at the specified index

Examples:

    lists:
      # List of all online staff members
      staff:
        type: ONLINE
        included: true
        filters:
        - PERMISSION:group.staff
        - CANSEE
      # List of all players that ever joined the server, excluding you
      all:
        type: ALL
        included: false
Clone this wiki locally