English
Placeholder Reference
PlaceholderAPI Placeholders
Expansion identifier: emakiattribute
Prerequisite: PlaceholderAPI is installed. Once it is, EmakiAttribute automatically registers a placeholder expansion that exposes player stats and resources to scoreboards, chat, menus, holograms, and other plugins
All placeholders use the format %emakiattribute_<key>%
Attribute Value Placeholders
Basic Format
text
%emakiattribute_<attribute_id>%Returns the player's current combat snapshot value for the attribute, formatted to at most 2 decimal places (e.g., 15.5, 100). Returns 0 if the attribute does not exist
Examples
| Placeholder | Description |
|---|---|
%emakiattribute_physical_attack% | Physical attack |
%emakiattribute_physical_defense% | Physical defense |
%emakiattribute_physical_crit_rate% | Physical crit rate |
%emakiattribute_physical_crit_damage% | Physical crit damage |
%emakiattribute_spell_attack% | Spell attack |
%emakiattribute_dodge_chance% | Dodge chance |
%emakiattribute_lifesteal% | Lifesteal ratio |
Power Placeholder
text
%emakiattribute_power%
%emakiattribute_attribute_power%Returns the player's total attribute power, computed from each attribute's attribute_power weight and the scores in attribute_balance.yml. power is normalized to the attribute id attribute_power, so both spellings are equivalent
Resource Placeholders
Basic Format
text
%emakiattribute_resource_<resource_id>%
%emakiattribute_resource_<resource_id>_<field>%Without a field, defaults to current
Available Fields
| Field | Description | Example |
|---|---|---|
current | Current value (default) | 85 |
max | Current maximum (including bonuses) | 120 |
default | Default maximum (without bonuses) | 100 |
bonus | Bonus maximum | 20 |
percent | Current value as percentage of max (0–100) | 70 |
regen | Configured regeneration per second | 2.5 |
Examples
| Placeholder | Description |
|---|---|
%emakiattribute_resource_health% | Current health |
%emakiattribute_resource_health_max% | Max health |
%emakiattribute_resource_health_percent% | Health percentage |
%emakiattribute_resource_mana% | Current mana |
%emakiattribute_resource_mana_max% | Max mana |
%emakiattribute_resource_mana_percent% | Mana percentage |
Common Usage
Scoreboard
yaml
lines:
- '&c❤ %emakiattribute_resource_health%/%emakiattribute_resource_health_max%'
- '&b✦ %emakiattribute_resource_mana%/%emakiattribute_resource_mana_max%'
- '&e⚔ Attack: %emakiattribute_physical_attack%'
- '&a🛡 Defense: %emakiattribute_physical_defense%'Condition System
Use PAPI placeholders directly in CoreLib condition expressions:
yaml
condition:
entries:
- '%emakiattribute_physical_attack% >= 100'
- '%emakiattribute_resource_mana_percent% >= 50'Skill Thresholds
Check attributes in EmakiSkills conditions:
yaml
condition:
entries:
- '%emakiattribute_physical_attack% >= 200'Display Tips
- Use consistent formatting for percentage attributes (e.g., 1 decimal place)
- Display resources in
current / maxformat - Avoid placing too many complex placeholders in high-frequency refresh scenarios (ActionBar, BossBar)
- Separate player-facing placeholders from admin debug placeholders
- Placeholder values are numeric strings without color codes, suitable for direct numeric comparison
Damage Message Template Variables
Inside a damage type's attacker_message / target_message, %variable% template variables are available
Entity information
| Variable | Description | Example |
|---|---|---|
%attacker% / %attacker_name% / %source% / %source_name% | Attacker display name | Steve |
%attacker_type% / %source_type% | Attacker entity type | PLAYER |
%attacker_uuid% / %source_uuid% | Attacker UUID | 550e8400-... |
%attacker_health% | Attacker current health | 18.5 |
%attacker_max_health% | Attacker max health | 20 |
%target% / %target_name% | Target display name | Zombie |
%target_type% | Target entity type | ZOMBIE |
%target_uuid% | Target UUID | ... |
%target_health% | Target current health | 12.3 |
%target_max_health% | Target max health | 40 |
%distance% | Distance between attacker and target | 5.2 |
Damage information
| Variable | Description | Example |
|---|---|---|
%damage_type% / %damage_type_name% | Damage type display name | Physical Damage |
%damage_type_id% | Damage type id | physical |
%source_damage% / %input_damage% | Original damage value | 25 |
%base_damage% | Base damage value | 20 |
%final_damage% / %damage% | Final damage value | 15.5 |
%cause% / %damage_cause% | Damage cause name | ENTITY_ATTACK |
%cause_name% / %damage_cause_name% | Localized damage cause name | Attack |
%cause_id% / %damage_cause_id% | Normalized damage cause id | entity_attack |
%critical% | Whether the hit was critical | true |
%critical_text% | Critical text; empty when not critical | critical |
%critical_suffix% | Critical suffix; empty when not critical | <red>critical</red> |
%roll% | Critical roll value | 0.85 |
Template example
yaml
damage_types:
physical:
attacker_message: "<gray>[Combat] You dealt <red>%final_damage%</red> damage to %target_name%%critical_suffix% <gray>(distance: %distance%m)"
target_message: "<gray>[Combat] %attacker_name% dealt <red>%final_damage%</red> damage to you%critical_suffix% <gray>(remaining: %target_health%/%target_max_health%)"