Placeholder Reference
PlaceholderAPI Placeholders
Expansion identifier: emakiitem
When PlaceholderAPI is installed, EmakiItem registers the following placeholders.
| Placeholder | Description | Example |
|---|---|---|
%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 |
%emakiitem_held_state_keys% | Item-state field names present on the main-hand item, sorted alphabetically and comma-joined. | charge,kills |
%emakiitem_held_state_revision% | Revision number of the item-state metadata. | 12 |
%emakiitem_held_state_instance% | Instance ID of the item-state metadata. | — |
%emakiitem_held_state_schema% | Schema version of the item-state metadata. | 1 |
%emakiitem_held_state_valid% | Whether the item-state metadata is valid; returns 1 or 0. | 1 |
%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
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) are triggered, the following variables are injected into the action context:
| Variable | Description | Example |
|---|---|---|
%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:
- 'send_message text="<green>%player% used %item_name%!</green>"'Notes
- When the player holds no EmakiItem,
held_idreturns an empty string;held_namealso returns an empty string when the main hand is empty. - Placeholder requests without a player context always return an empty string.
loaded_countcounts only definitions loaded fromitems/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.