Skip to main content

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 two l characters: rpglevelling (not rpgleveling). Matching is case-insensitive (%RPGLEVELLING_LEVEL% works the same).
TokenReplaced 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)
If the player has no class selected, class-related tokens resolve to empty (or 0 for tier where applicable).

Example: Essentials-style chat format

A common goal is a line similar to:
[Player] Lv.%rpglevelling_level% %rpglevelling_class% {player}: {message}
  • %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.
Where to edit: open your Essentials (or server chat) config in the plugin’s data folder under 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):
# EXAMPLE — keys and variables are NOT guaranteed for every Essentials build
[Chat]
format = "Lv.%rpglevelling_level% %rpglevelling_class% {username}: {message}"
Restart the server (or use that mod’s reload command) after saving.

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

IssueWhat to check
%rpglevelling_level% shows literallyTypo: use rpglevelling (two l). Confirm RPG Leveling is loaded.
Level always 1Usually 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 emptyPlayer may have no class selected in the Stats GUI.
Another placeholder shows literallyConfirm the token name in your chat mod’s docs; RPG Leveling only expands %rpglevelling_*%.

For mod developers

Other plugins can read the same data from RPGLevelingAPI (see API); the chat tokens above are a convenience for config strings, not a second API surface.