For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ”Match Entity Format

MatchEntityFormat is the shared format used whenever EnchantmentReform tests a living entity.

It is used by the match_entity Power Condition and entity-selection abilities such as nearby_entities.

match-entity:
  monster: true
  entity-types:
    - ZOMBIE
    - SKELETON
  entity-health: 20

Evaluation rules

A MatchEntityFormat section does not use a type field. Every recognized key enables one rule, and rules at the same level use logical AND. List entries inside one rule normally use OR.

Missing and invalid input

  • A missing MatchEntityFormat section matches everything.

  • A missing entity does not match.

  • The matcher accepts LivingEntity; non-living entities must be filtered by an ability that supports them rather than this format.

  • Unknown keys are ignored.

  • none: true forces failure.

Logical composition

Use any for alternatives:

Use not to reject nested matches:

Equipment matching

equip contains a MatchItemFormat section for one or more equipment slots:

Built-in rules

Rule key
Purpose

entity-types

Matches Bukkit entity types.

none

Forces failure when true.

entity-contains-name

Matches text in the entity's custom/display name.

entity-health

Checks current entity health against the configured threshold/range.

entity-tag

Matches Bukkit/Minecraft entity tags.

entity-pdc

Matches configured PersistentDataContainer values.

ranged

Checks whether the entity qualifies as a ranged attacker under the platform implementation.

monster

Requires or rejects Bukkit Monster.

animal

Requires or rejects Bukkit animal classification.

equip

Matches equipment using nested MatchItemFormat sections.

mythicmobs

Matches MythicMobs internal IDs when the hook is loaded.

levelled-mobs

Matches LevelledMobs data when that plugin is loaded.

any

Passes when one nested group passes.

not

Rejects a nested match.

Optional rules

Rule
Requirement

mythicmobs

MythicMobs must be loaded before EnchantmentReform registers match rules.

levelled-mobs

LevelledMobs must be loaded.

Paper ranged classification

Paper may provide richer ranged-entity classification than Spigot.

An unavailable optional rule is not registered; its key is therefore ignored. Confirm hook registration in startup logs.

Complete example

Last updated