Skip to content

Placeholder Reference ​

Prerequisite: CoreLib registers no PlaceholderAPI expansion of its own. It provides the action context variable system that every module uses 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 nameSteve
%player_name%Player name (same value as %player%)Steve
%player_uuid%Player UUID550e8400-e29b-...
%player_world%World the player is inworld
%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 phasesuccess

Note: these player variables are injected only 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:
  - 'send_message text="<green>Congratulations %player_name%, operation successful!</green>"'
  - 'run_command_as_console 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, which you can verify directly

yaml
actions:
  - 'send_message 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)