Skip to content

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

VariableDescriptionExample
%player%Player name.Steve
%player_name%Player name (same value as %player%).Steve
%player_uuid%Player UUID.550e8400-e29b-...
%player_world%World the player is in.world
%player_x%Player X coordinate (floating point).128.5
%player_y%Player Y coordinate (floating point).64.0
%player_z%Player Z coordinate (floating point).256.0
%phase%Current action phase.success

These player variables are only injected when the action context has a player. Variable name lookup is case-insensitive, and a value explicitly supplied by the caller takes precedence.

Usage Example

yaml
actions:
  - 'sendmessage text="<green>Congratulations %player_name%, operation successful!</green>"'
  - 'runcommandasconsole command="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:
  - 'sendmessage text="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).