Chat placeholders (Essentials & more)
RPG Leveling can fill in chat format strings with the player’s level, XP, and class using tokens like%rpglevelling_level%. This is handled inside RPG Leveling (a PlayerChatEvent hook that runs after typical chat formatters).
Use this when you configure Essentials or any other mod that lets you set a global chat format or per-group format as plain text.
Step-by-step (Essentials Core, teeditator): Level display in chat formatting (Essentials Core) — enable chat, edit config.toml, put Lv and class next to %player%.
Supported tokens
Spell the prefix with twol characters: rpglevelling (not rpgleveling). Matching is case-insensitive (%RPGLEVELLING_LEVEL% works the same).
| Token | Replaced with |
|---|---|
%rpglevelling_level% | Current level (number) |
%rpglevelling_xp% | Current XP (number) |
%rpglevelling_xp_to_next% | XP needed for next level (same as below) |
%rpglevelling_xp_to_level% | XP needed for next level |
%rpglevelling_max_level% | Configured max level |
%rpglevelling_is_max_level% | true or false |
%rpglevelling_class% | Localized class display name (same as class_display) |
%rpglevelling_class_display% | Localized display name |
%rpglevelling_class_name% | Raw class display name from class config |
%rpglevelling_class_id% | Internal class id (e.g. Heavy, Archery) |
%rpglevelling_class_tier% | Tier for the selected class (0–4) |
0 for tier where applicable).
Example: Essentials-style chat format
A common goal is a line similar to:%rpglevelling_*%— replaced by RPG Leveling after Essentials (and other mods) build the message.{player},{message}, etc. — depend on Essentials (or whatever chat mod you use). Use the exact placeholders your chat mod documents for username and message body.
mods/ — often a config.toml or config.json with a section for chat / formatting. Keys differ by mod version; if unsure, search that mod’s docs for “chat format” or “global chat format”.
Minimal RPG-only example (illustration only — adjust variables to match your chat plugin):
Other placeholders in the same string
RPG Leveling only replaces%rpglevelling_*%. Any other %...% or {curly} tokens in your format string are defined by Essentials (or whichever chat mod you use). If one appears literally in chat, check that mod’s documentation for the correct name and that the feature is enabled.
Troubleshooting
| Issue | What to check |
|---|---|
%rpglevelling_level% shows literally | Typo: use rpglevelling (two l). Confirm RPG Leveling is loaded. |
Level always 1 | Usually means the player’s data was read before the world/store was ready; report with game version and other mods if it persists. |
| Class token empty | Player may have no class selected in the Stats GUI. |
| Another placeholder shows literally | Confirm the token name in your chat mod’s docs; RPG Leveling only expands %rpglevelling_*%. |
For mod developers
Other plugins can read the same data fromRPGLevelingAPI (see API); the chat tokens above are a convenience for config strings, not a second API surface.