Placeholder Reference
CoreLib does not register a PlaceholderAPI expansion itself, but it provides the action context variable system used by all modules during action execution.
Action Context Variables
When an action is triggered, CoreLib automatically injects the following built-in variables into the context. All module action configs can reference them using the %variable% format.
Built-in Variables
| Variable | Description | Example |
|---|---|---|
%player_name% | Player display name. | Steve |
%player_uuid% | Player UUID. | 550e8400-e29b-... |
%player_world% | World the player is in. | world |
%player_x% | Player X coordinate. | 128 |
%player_y% | Player Y coordinate. | 64 |
%player_z% | Player Z coordinate. | 256 |
%phase% | Current action phase. | success |
Usage Example
yaml
actions:
- type: message
value: '<green>Congratulations %player_name%, operation successful!'
- type: command
value: 'say %player_name% completed an operation in %player_world%'Inline Tokens
CoreLib also supports the <show_item> inline token. When show_item is set in the action context, it renders an item hover tooltip in chat messages.
yaml
actions:
- type: message
value: 'You received <show_item>!'Notes
- Sub-modules (Forge, Gem, Skills, etc.) inject additional variables into their own action contexts. See each module's placeholder docs for details.
- Action context variables and PlaceholderAPI placeholders are two independent systems. They share the same format but are resolved at different times.
- PlaceholderAPI placeholders can also be used in actions (requires PlaceholderAPI installed).