-
Notifications
You must be signed in to change notification settings - Fork 29
TextPlaceholderAPI 1.18.1
Since version 3.0.2, PlayerEx supports TextPlaceholderAPI.
Placeholder | Online Status | Result |
---|---|---|
%playerex:level% |
Online Players Only | This displays the player's current level attribute value. |
%playerex:name_top/x% |
Offline and Online Players | This displays the player's name whose level is the highest in the current world; where x represents the relative position of the player in terms of level. For example: for the player with the highest level, x would be 1 ; for the player with the second highest level, x would be 2 , and so on. The name displayed is provided by GameProfile#getName . |
%playerex:level_top/x% |
Offline and Online Players | This displays the player's level whose level is the highest in the current world; were x represents the relative position of the player in terms of level. For example: for the player with the highest level, x would be 1 ; for the player with the second highest level, x would be 2 , and so on. The value displayed is provided by LivingEntity#getAttributeValue . |
When a player leaves a world (disconnects), PlayerEx caches that player's UUID
, Name
and Level
; these values are used by the server when providing placeholders for offline players, whereas for online players the current/live value is provided instead of the cached one. Upon joining a world (reconnecting) that player's cache is removed and their current/live values are used once again.
This offline caching functionality is provided by Offline Player Cache - a lightweight library/API mod; PlayerEx ships with it included (jar-in-jar). There may be circumstances where a player has quit a world/server but their cache is still there. To remove their cache, or even just their cached Name
or Level
, please see here.