Skip to content

Metadata

OfficialRell edited this page Oct 9, 2026 · 10 revisions

Spawner Metadata

Metadata can be configured in metadata.yml file.

Spawner metadata is configured under two sections:

  • Item-spawners.values: metadata that can be applied to items only
  • Entity-spawners.values: metadata that can be applied to living entities

Item-spawners.default-value selects which item metadata is used when no item metadata is specified.


Item spawner default value

Item-spawners:
  default-value: <item metadata key>

This must match an existing key under Item-spawners.values.

If the configured value is invalid, the plugin falls back to its internal default metadata.


Item metadata

Item-spawners:
  default-value: <item metadata key>
  values:
    <item metadata key>:
      display:
        name: '<#ffff00>Custom Spawner'
        inside: <global item key>
      list:
        <global item key>:
          weight: 1
          amount: 1

<item metadata key> is the item metadata name used by the plugin.


Spawner display

display:
  name: '<#ffff00>Custom Spawner'          # optional
  inside: <global item key/spawner type>   # optional
  • name - spawner display name (supports %type% to include the formatted spawner type).
  • inside - the item or entity that is shows rotating in the spawner.

This can be used for both item and entity metadata.


Item metadata weighted item list

list:
  <global item key>:
    weight: 1
    amount: 1

Defines the drop pool for the item spawner.

Each key inside list must match an existing key from Global-items.

The list cannot be empty.

  • weight - weighted chance of this item being selected relative to the other entries in the same list.
  • amount - how many of that item are dropped when this entry is selected; also supports ranged values (1-3).

Global items

Item metadata uses entries from Global-items.

Global-items:
  <global item key>:
    material: DIAMOND
    name: "<#00ffff>Custom Item"   # optional
    lore:                          # optional
    - "<#808080>Line 1"
    - "<#808080>Line 2"
    enchantments:                  # optional
      sharpness: 5
      unbreaking: 3
    model: 0                       # optional

Defines one reusable item entry.

  • material - item material type.
  • name - display name.
  • lore - item description.
  • enchantments - enchantment and level pairs.
  • model - custom model data value.

Entity metadata

Entity-spawners:
  values:
    <entity metadata key>:
      display:
        name: "<#ff0000>Custom %type%"   # optional
        inside: ZOMBIE                   # optional
      applicable:
        list:                            # optional
        - ZOMBIE
        - HUSK
        exclude: false                   # optional
      traits:
      - trait: silent
        value: true

Defines one entity metadata entry.

  • display - same as item display configuration
  • applicable:
    • list - list of spawner types the metadata can be applied to.
    • exclude - when true the list becomes a blacklist.
  • traits - a list of trait entries; each entry must have a trait: <trait ID>

Entity trait configuration

traits:
- trait: silent
  value: true
  chance: 25      # optional
  limit: 2        # optional
- trait: named
  ...

Defines trait operations that are applied to spawned entities.

Must be a list of trait entries.

  • chance - chance for the trait to attempt applying to each entity
  • limit:
    • 0 or unset - unlimited.
    • positive n - applies the trait until it reaches n (limit: 5)
    • negative n - applies the trait until there are n entities left (limit: -3)

Built-in values:

  • attribute
  • baby
  • invulnerable
  • named
  • silent
  • transform

Chained traits

then:                 # optional
  trigger: success    # optional
  traits:
    - trait: silent
      value: true

Defines chained traits that run after the parent trait.

If this list is empty or invalid, the chain is ignored.

The child traits only run on entities selected by the trigger.

Trigger values:

  • always: every processed entity
  • success: only entities where the parent trait succeeded
  • fail: only entities where the parent trait failed
  • index:<n>: only the entity at that exact index
  • after:<n>: only entities after that index
  • before:<n>: only entities before that index
  • every:<n>: every second entity by index rule used by the plugin

<n> starts at 0


Built-in traits

attribute

traits:
- trait: attribute
  attribute: scale
  value: '*0.5'

Changes one attribute on the spawned entity.

  • attribute - attribute to modify, see attributes.
  • value - shift operation applied to the current attribute value.

All shift values:

  • n: sets n as the base value
  • +n: adds n to the base value
  • -n: subtracts n from the base value
  • *n: multiplies the base value by n
  • /n: divides the base value by n

If invalid, the trait fails to load.

Notes:

  • This only succeeds on entities that support the selected attribute.
  • When changing health, the plugin also updates the entity’s current health to match the new base value, with a minimum of 0.01.

baby

traits:
- trait: baby
  value: true   # optional - default: true

Makes an entity baby or adult.

  • value - set true for a baby, false for adult.

Notes:

  • This only succeeds on ageable entities.
  • On unsupported entities, the trait runs but does not succeed.

effect

traits:
- trait: effect
  potion: speed
  duration: 200     # optional - default: 100
  amplifier: 2      # optional - default: 1
  ambient: false    # optional - default: false
  particles: true   # optional - default: true

Applies a potion effect to the spawned entity.

  • potion - potion effect type, see potion effect types.
  • duration - effect duration in ticks.
  • amplifier - strength level of the effect (e.g. 1 = level I, 2 = level II); must be greater than 0.
  • ambient - should the effect be ambient (more and slightly translucent).
  • particles - should the effect produce particles.

invulnerable

traits:
- trait: invulnerable
  value: true           # optional - default: true

Sets whether the entity is invulnerable.

  • value - set true to be invulnerable, false to be vulnerable.

named

traits:
- trait: named
  name: "<#ff0000>Elite %type%"
  visible: true                   # optional - default: true

Sets the entity custom name.

  • name - name the entity will have; supports %type% to include the formatted spawner type.
  • visible - set true to show always, false to show only when looking at.

silent

traits:
- trait: silent
  value: true     # optional - default: true

Sets whether the entity is silent.

  • value - set true to be silent, false to make noise.

transform

traits:
- trait: transform
  to: WITHER_SKELETON

Replaces the spawned entity with a new entity of another spawner type.

  • to - to what entity the spawned entity will be replaced with, see spawner types.

Example trait configuration

traits:
- trait: transform
  to: WITHER_SKELETON
  chance: 25
  limit: 2
  then:
    trigger: success
    traits:
    - trait: attribute
      attribute: scale
      value: '*0.5'
    - trait: silent
      value: true

Explanation: When an entity spawns it has a 25% chance to be transformed into a Wither Skeleton and scaled half its size and set silent.

Clone this wiki locally