Closed MaHl111 closed 1 year ago
This sounds like a limitation of the placeholder implementation in the other plugins, rather than a bug in ServerListPlus. SLP simply forwards all placeholder handling to PlaceholderAPI, so I don't see any reason why some placeholders would be handled differently than others.
However, there is one fundamental limitation for the server list that you need to keep in mind: Many placeholders using PlaceholderAPI assume that the identity of the player is known and that they are currently online (playing) on the server. For placeholders in SLP, the player is usually not onlline and even the identity is only sometimes known (since this is just a guess based on the player IP address).
And indeed, the TAB plugin you mentioned always returns an empty string if the player is not online. This would need to be fixed there.
I was not able to find the source code for the "CMI" plugin. If it is a premium plugin, please ask them for commercial support.
Fair points. I've been tinkering with placeholders in these two plugins and they were outputing intended values in the end, so I assumed they should be accessible in global scope and dynamically change, regardless if player is on server or not, as server version (even though they are not related, but similar) and other values like that were parsed without a problem. I'll try to talk this out with CMI stuff if this can be outputted without player being online so I can put state in to MOTD and such. I'll post update when I get it sorted and close the thread. Thanks for your help.
Summary
I encountered this bug when I was trying to use state placeholders from CMI in SLP. While using some other placeholders like
{server_version}
works just fine, placeholder like{cmi_maintenance_state}
does not parse (even though it parse on server or when tested with/papi parse
, should result inTrue/False
). Instead I'm getting blank space where placeholder should be parsed. I'm trying to use this placeholder with TAB's placeholder replace to achieve custom formatting instead ofTrue/False
. However, both variants are not being parsed in SLP.Result
Versions
PaperSpigot - 1.18.1, Build 68 CMI - 9.1.3.0 PlaceholderAPI - 2.11.1 ServerListPlus - v3.5.0-SNAPSHOT
Config
Conclusion
It's not really big deal for me but some people might heavily depend on placeholders to customize MOTD, assuring correct parsing and support for PlaceholderAPI is must in that case.