xyz.refineryteam.refinerycore.api.text.Placeholders is a lightweight PlaceholderAPI-style resolver. Plugins register named placeholders once, then any string can reference them as %namespace_key% and get substituted before MiniMessage parsing. Unlike PlaceholderAPI there is no external dependency — the registry lives inside RefineryCore, so suite plugins share one namespace without each shipping their own expansion.
Registering a placeholder
EconomyExpansion.java
null for console/global contexts) and anything after a colon in the placeholder body. Return "" rather than null for empty values.
Rendering placeholders
BroadcastTask.java
Resolution rules
- Names are matched case-insensitively; namespaces are lowercased internally.
- For a token like
%economy_balance%, the resolver first tries an exact namespace split (economy+balance), then falls back to treating the whole body as a bare unnamespaced name. - Anything after a
:inside the token is passed to the resolver as itsargsstring (e.g.%myplugin_top:3%→"3"). - Unknown placeholders are left verbatim, so other systems — or PlaceholderAPI itself, if installed — can still handle them.
- If a resolver throws, the token resolves to an empty string instead of breaking the render.

