Skip to content

Placeholder Reference ​

PlaceholderAPI Placeholders ​

Expansion identifier: emakiitem

Prerequisite: PlaceholderAPI is installed. Once installed, EmakiItem registers the following placeholders — paste them into lore, a scoreboard, or a chat format and they resolve

PlaceholderDescriptionExample
%emakiitem_held_id%EmakiItem definition ID of the main-hand itemshadow_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 itemminecraft: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 definitions156
%emakiitem_held_state_keys%Item-state field names present on the main-hand item, sorted alphabetically and comma-joinedcharge,kills
%emakiitem_held_state_revision%Revision number of the item-state metadata12
%emakiitem_held_state_instance%Instance ID of the item-state metadata—
%emakiitem_held_state_schema%Schema version of the item-state metadata1
%emakiitem_held_state_valid%Whether the item-state metadata is valid; returns 1 or 01
%emakiitem_held_state_has_<key>%Whether the main-hand item has that item-state field; returns 1 or 0%emakiitem_held_state_has_charge%
%emakiitem_held_state_<key>%Value of that item-state field; empty when the field is absent%emakiitem_held_state_charge%

Component IDs may omit the minecraft: namespace

NOTE

Name-collision priority: keys, revision, instance, schema, and valid are also usable field names. When the item really carries an item-state field with one of those names, %emakiitem_held_state_<name>% returns that field's value instead of the metadata

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) trigger, the variables below are injected into the action context; reference them as %variable% in action parameters:

VariableDescriptionExample
%player%Player nameSteve
%item_id%EmakiItem definition IDshadow_blade
%item_trigger%Trigger nameright_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; when a placeholder or variable resolves empty, work through the notes below

Action Example ​

yaml
actions:
  right_click:
    - 'send_message 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; when you get an empty value, confirm that the resolving context actually has a player
  • loaded_count counts only definitions loaded from items/ and excludes definitions registered at runtime
  • 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