ServerListPlus icon indicating copy to clipboard operation
ServerListPlus copied to clipboard

Placeholders for online players

Open jonthesquirrel opened this issue 7 years ago • 2 comments

As discussed in #90 and #88 the plugin can't get placeholders of the player viewing the server list as they are not online. However, what I am proposing is to add PlaceholderAPI support to the player list. So right now I have this in my hover config:

%random_players,100|
%

and my goal is to show each online player's displayname instead of their username.

jonthesquirrel avatar Jul 05 '17 14:07 jonthesquirrel

I wrote a plugin that adds a placeholder to ServerListPlus that fits my use case for using PlaceholderAPI. It's up to you if you still want to add this feature, but I don't need it anymore. :)

Here's the format I settled on, if you're interested.

%placeholderapi_players,5`{vault_prefix}{player_name}`|
%

The string inside the backticks is formatted for each online player through PlaceholderAPI.

jonthesquirrel avatar Oct 22 '17 09:10 jonthesquirrel

Awesome, this is why the API exists. :) I'll keep this open for a bit until I decide if I'll include this in SLP 4.0.

stephan-gh avatar Oct 22 '17 09:10 stephan-gh