Skip to content

Placeholder Reference

PlaceholderAPI Placeholders

Expansion identifier: emakiitem

When PlaceholderAPI is installed, EmakiItem registers the following placeholders.

PlaceholderDescriptionExample
%emakiitem_held_id%EmakiItem definition ID of the main-hand item.shadow_blade
%emakiitem_held_name%Display name of the main-hand item (plain text).Shadow Blade
%emakiitem_held_components%Component ID list of the main-hand item.minecraft:custom_name, minecraft:lore
%emakiitem_held_components_raw%Raw component string of the main-hand item.
%emakiitem_held_component_has_<id>%Whether the main-hand item has the component; returns 1 or 0.%emakiitem_held_component_has_custom_model_data%
%emakiitem_held_component_value_<id>%Value string of that component.%emakiitem_held_component_value_rarity%
%emakiitem_held_component_json_<id>%JSON output of that component.%emakiitem_held_component_json_enchantments%
%emakiitem_loaded_count%Total number of loaded item definitions.156

Component IDs may omit the minecraft: namespace.

Usage Example

yaml
item:
  components:
    lore:
      - "<gray>Item ID: <white>%emakiitem_held_id%</white></gray>"
      - "<gray>Loaded Definitions: <white>%emakiitem_loaded_count%</white></gray>"

Action Context Variables

When item actions (EmakiItemActionService) are triggered, the following variables are injected into the action context:

VariableDescriptionExample
%player%Player name.Steve
%item_id%EmakiItem definition ID.shadow_blade
%item_trigger%Trigger name.right_click
%item_name%Item display name (plain text).Shadow Blade

Some triggers inject additional variables, such as %target% and %damage% for attack. See Triggers for the full list.

Action Example

yaml
actions:
  right_click:
    - 'sendmessage text="<green>%player% used %item_name%!</green>"'

Notes

  • When the player holds no EmakiItem, held_id returns an empty string; held_name also returns an empty string when the main hand is empty.
  • Placeholder requests without a player context always return an empty string.
  • loaded_count counts only definitions loaded from items/ and excludes definitions registered at runtime through JavaScript.
  • External plugin items without EmakiItem PDC tags cannot be recognized as EmakiItem.
  • CoreLib built-in context variables (%player_name%, %player_uuid%, etc.) are also available in item actions.