Skip to content

Mob Definitions

Mob definition files live in plugins/EmakiMobs/mobs/*.yml. Each file defines one custom mob.

Top-level fields

FieldTypeRequiredDescription
idstringUnique mob ID. If it matches a vanilla EntityType name (e.g. zombie), type override is activated automatically.
typestringVanilla entity type name (e.g. zombie, skeleton, creeper). Defaults to id when omitted.
display_namestringDisplay name for admin commands and logs. Supports MiniMessage format.
experienceintVanilla experience dropped on death. Default 0.
componentssectionEntity attribute and data fields mapped by ComponentMapper. See Components.
attributessectionEmakiAttribute value map (requires EmakiAttribute).
skillssectionSkill trigger map (requires EmakiSkills). See Triggers.
threatsectionThreat table configuration. Omit to disable the threat system.
boss_barsectionBoss 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.

yaml
# Buff all vanilla zombies
id: zombie
type: zombie
components:
  max_health: 22.0
  attack_damage: 3.5

CAUTION

⚠ 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

yaml
attributes:
  STR: 15   # key matches the attribute ID defined in EmakiAttribute
  VIT: 10
  AGI: 5

threat section

FieldTypeDefaultDescription
enabledbooleantrueEnable the threat system.
max_rangedouble64.0Players beyond this range (blocks) are not tracked.
weights.damagedouble1.0Threat generated per point of damage dealt.
weights.healingdouble0.5Threat generated per point of healing given to allies.
decay.ratedouble0.05Fraction of threat decayed per second (0.05 = 5%/s).
decay.out_of_rangebooleantrueClear a player's threat immediately when they leave max_range.

boss_bar section

FieldTypeDefaultDescription
titlestring""Bar title. Supports MiniMessage format.
colorstringPURPLEPINK / BLUE / RED / GREEN / YELLOW / PURPLE / WHITE.
stylestringSOLIDSOLID / SEGMENTED_6 / SEGMENTED_10 / SEGMENTED_12 / SEGMENTED_20.
rangedouble64.0Bar 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 (colorPURPLE, styleSOLID).

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

yaml
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