Placeholders
On this page(2)
All placeholders require PlaceholderAPI and use the %snhub_ prefix. SnHub registers the expansion only when PlaceholderAPI is present. Without it the plugin is fully functional.
| Placeholder | Description |
|---|---|
%snhub_count_total% | Players on the whole proxy. |
%snhub_count_<server>% | Players on one proxy server, spelled as in servers.list. |
%snhub_hubs_live% | Number of live hubs in the network. |
%snhub_hub_<id>_online% | Players on one live hub. |
%snhub_server_id% | This hub's server id. |
%snhub_pvp% | The PvP status word of the player: status.pvp-on or status.pvp-off from the lang file. |
%snhub_pvp_mode% | true while the player is in PvP mode, otherwise false. |
%snhub_visibility% | The hide-players status word of the player: status.shown or status.hidden from the lang file. |
%snhub_count_total%
%snhub_count_survival%
%snhub_hubs_live%Global and player placeholders
The count, hubs and server id placeholders are global. They also resolve without a player, so you can use them in holograms and from the console. %snhub_pvp%, %snhub_pvp_mode% and %snhub_visibility% need a player.
Every value is read from state SnHub already keeps in memory, so the placeholders are safe to use in scoreboards.
A value that is not known yet renders the status.unknown word of the lang file. This covers a proxy that has not answered, a hub that is offline and a server id that is not resolved. A placeholder name SnHub does not know is left untouched by PlaceholderAPI.
Menu tokens
Menus support extra tokens that do not need PlaceholderAPI.
| Token | Where | Description |
|---|---|---|
{count_<server>} | guis/selector.yml | Live player count of a proxy server, spelled as in servers.list. |
{count_total} | guis/selector.yml | Live player count of the whole proxy. |
{id} and {name} | guis/hubs.yml, hub template | The hub's server id. |
{online} and {max} | guis/hubs.yml, hub template | Players on the hub and its capacity. |
{status} | guis/hubs.yml, hub template | The current, full, online or offline word of the lang file. |
A server missing from servers.list is not counted, and its {count_<server>} token is left as written. A format hint is allowed, for example {count_survival:grouped}.