Bettergui Plugin Wiki › Guides › Show live player info in menus with PlaceholderAPI
Show live player info in menus with PlaceholderAPI
Enable placeholders
BetterGUI can use PlaceholderAPI placeholders in button names and lore. Both plugins must be on the server.
1. Install the placeholder expansions you need with /papi ecloud download <name> and then /papi reload.
2. Put the placeholders in your button text:
`yaml
stats-button:
slot: 13
id: PLAYER_HEAD
name: "&b%player_name%"
lore:
- "&7World: &f%player_world%"
- "&7Ping: &f%player_ping%"
`
Each placeholder is replaced with the viewing player's own value when the menu opens.
Keep values current
By default a menu may only update when it is opened. If you want the numbers to change while the menu is open, check your version's menu settings for an auto-refresh or update option. Don't set it very fast on a busy server.
Troubleshooting
- If you see the raw text
%player_name%, PlaceholderAPI isn't loaded or the expansion isn't installed. - Run
/papi parse me %player_name%to confirm the placeholder works outside the menu. - Wrap text with colour codes in quotes in the YAML, so symbols like
%and&don't break the file.