Variables & placeholders
Variables
A variable stores a value — coins, a setting, what a player picked. Make one in the Variables tab: a name, a type (Number, True/False or Text), who it's for, and a start value.
| For | Kept |
|---|---|
| Each player | One value per player, saved with the player. |
| Whole server | One value for everyone, saved on the server. |
| This menu only | One value per player while the menu is open. It starts again each time the menu opens, and is never saved. |
- Set variable sets, adds, subtracts, toggles or resets one; Get variable reads it.
- Connect variable (inspector → Value) ties a toggle, checkbox, slider, progress bar or input box to a variable: it shows the value and changes it.
- In text, write
%project:name%. Changes show at once in open menus and HUDs. - From commands:
/nxgui var set|add|toggle|reset|get— see Commands.
Built-in values
These work without PlaceholderAPI:
| Placeholder | Value |
|---|---|
%nx_money% | Balance (Vault) |
%nx_health% %nx_max_health% %nx_hearts% | Health |
%nx_food% %nx_saturation% %nx_armor% %nx_air% | Hunger, saturation, armor, air bubbles (0–10) |
%nx_level% %nx_exp% | XP level, XP bar (0–100) |
%nx_x% %nx_y% %nx_z% %nx_world% %nx_biome% | Where the player is |
%nx_direction% %nx_heading% | Facing (N … NW), and in degrees |
%nx_time% %nx_day% | World clock, day |
%nx_ping% %nx_online% %nx_max_players% | Ping, players online |
%nx_gamemode% %nx_kills% %nx_deaths% | Game mode, kills, deaths |
%nx_underwater% %nx_entity_in_reach% %nx_block_in_reach% | true or false |
%nx_perm_<node>% | true when the player has that permission |
%player% always works. Everything else — %player_name%, %vault_eco_balance% — comes from PlaceholderAPI.
Formats
End any placeholder that gives one number with a format, like %nx_money:short%.
| Format | Example |
|---|---|
:short | 1234567 → 1.2M |
:commas | 1234.5 → 1,234.50 |
:time | 330 seconds → 5:30 |
:0 :0.0 :0.00 | Rounded to that many decimals |
:onoff | A True/False variable as On / Off |
More values
| Placeholder | Value |
|---|---|
%nxgui_<key>% | What a player typed into the input box with that key |
%nxgui_arg_<name>% | An argument of the menu's own open command |
%nxgui_arg_1%, %nxgui_arg_2% … | In a popup: the values given to /nxgui popup show |
@Name:%…% | That player's value instead of the viewer's |
Other plugins can read your variables through PlaceholderAPI as %nxgui_project:name%.