Placeholders
On this page(3)
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_modality_<id>_state% | The state word of a modality: status.modality-open, status.modality-coming-soon or status.modality-maintenance. |
%snhub_modality_<id>_players% | The player count of a modality. |
%snhub_modality_<id>_max% | Its player cap (max-players). |
%snhub_modality_<id>_bar% | Its progress bar, styled by the bar section of modalities.yml. |
%snhub_modality_<id>_countdown% | Time left until its opening date. |
%snhub_modality_<id>_opening% | Its opening date, in settings.date-format. |
%snhub_modality_<id>_name% | Its display name. |
%snhub_count_total%
%snhub_count_survival%
%snhub_hubs_live%Global and player placeholders
The count, hubs, server id and modality 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}.
Modality hologram tokens
The layouts in modalities.yml use their own tokens, filled by SnHub before the hologram engine renders the line. PlaceholderAPI placeholders in a layout still work: the engine resolves them.
| Token | Description |
|---|---|
{name} | The modality's display-name. |
{color} | Its color as &#RRGGBB. |
{versions} | Its version range. |
{players} and {max} | Its player count and cap. |
{bar} | The progress bar. |
{countdown} | Time left until the opening, with the modality.countdown-* formats of the lang file. |
{opening} | The opening date. |
{badge} | The modality.badge-new text during the first new-days after the opening, otherwise empty. |
{id} | The modality id. |