Mob Definitions
Mob definition files live in plugins/EmakiMobs/mobs/*.yml. Each file defines one custom mob.
Top-level fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | Unique mob ID. If it matches a vanilla EntityType name (e.g. zombie), type override is activated automatically. |
type | string | — | Vanilla entity type name (e.g. zombie, skeleton, creeper). Defaults to id when omitted. |
display_name | string | — | Display name for admin commands and logs. Supports MiniMessage format. |
experience | int | — | Vanilla experience dropped on death. Default 0. |
components | section | — | Entity attribute and data fields mapped by ComponentMapper. See Components. |
attributes | section | — | EmakiAttribute value map (requires EmakiAttribute). |
skills | section | — | Skill trigger map (requires EmakiSkills). See Triggers. |
threat | section | — | Threat table configuration. Omit to disable the threat system. |
boss_bar | section | — | Boss bar configuration. Omit to hide the bar. |
Type override
When id exactly matches a valid vanilla EntityType name (case-insensitive), EmakiMobs applies this definition's components and attributes to all naturally spawned entities of that type. No spawn_rules/ entry is needed.
# Buff all vanilla zombies
id: zombie
type: zombie
components:
max_health: 22.0
attack_damage: 3.5CAUTION
⚠ Type override affects all naturally spawned entities of that type, including those created by other plugins. Use a separate id with a type: natural spawn rule instead when you only want custom mobs in specific areas.
attributes section
attributes:
STR: 15 # key matches the attribute ID defined in EmakiAttribute
VIT: 10
AGI: 5threat section
| Field | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable the threat system. |
max_range | double | 64.0 | Players beyond this range (blocks) are not tracked. |
weights.damage | double | 1.0 | Threat generated per point of damage dealt. |
weights.healing | double | 0.5 | Threat generated per point of healing given to allies. |
decay.rate | double | 0.05 | Fraction of threat decayed per second (0.05 = 5%/s). |
decay.out_of_range | boolean | true | Clear a player's threat immediately when they leave max_range. |
boss_bar section
| Field | Type | Default | Description |
|---|---|---|---|
title | string | "" | Bar title. Supports MiniMessage format. |
color | string | PURPLE | PINK / BLUE / RED / GREEN / YELLOW / PURPLE / WHITE. |
style | string | SOLID | SOLID / SEGMENTED_6 / SEGMENTED_10 / SEGMENTED_12 / SEGMENTED_20. |
range | double | 64.0 | Bar is visible to players within this range (blocks). |
color and style are case-insensitive and map to the paper-api BarColor / BarStyle enums.
Invalid values fall back silently
color and style are resolved with valueOf. When resolution fails there is no error and no log line — the value falls back to the default (color → PURPLE, style → SOLID).
BarStyle has no NOTCHED_6 / NOTCHED_10 / NOTCHED_12 / NOTCHED_20 constants. Writing NOTCHED_10 gives no warning and silently produces a solid (SOLID) bar. Use SEGMENTED_* for a segmented bar.
Full example
id: elite_zombie
type: zombie
display_name: "<gradient:#ff4444:#ffaa00>Elite Zombie</gradient>"
components:
max_health: 80.0
movement_speed: 0.28
attack_damage: 7.0
follow_range: 40.0
knockback_resistance: 0.3
custom_name: "<gradient:#ff4444:#ffaa00>Elite Zombie</gradient>"
custom_name_visible: true
persistent: true
loot_table: "emakimobs:entities/elite_zombie"
experience: 80
attributes:
STR: 15
VIT: 10
skills:
on_spawn:
- "nearby radius=20 type=player | send_message text='<red>Elite Zombie has arrived!'"
on_death:
- "killer | give_exp amount=80"
threat:
enabled: true
max_range: 48.0
boss_bar:
title: "<gradient:#ff4444:#ffaa00>Elite Zombie</gradient>"
color: RED
style: SEGMENTED_10
range: 60.0