-
Notifications
You must be signed in to change notification settings - Fork 1
Metadata
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 metadata entries are created under:
Item-spawners:
default-value: <item metadata key>
values:
<item metadata key>:
...Each key under Item-spawners.values is the item metadata ID.
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: 1Every option that uses <global item key> you must use an existing global item key (e.g. golden_nugget).
Item-spawners:
default-value: <item metadata key>This must match an existing key inside Item-spawners.values.
If the configured value is invalid, the plugin falls back to its internal default metadata.
Item-spawners:
values:
<item metadata key>:
...<<item metadata key>> is the item metadata ID used by the plugin.
display:
name: '<#ffff00>Custom Spawner'Optional
Sets the display name of the spawner.
You can use %type% placeholder to include the formatted spawner type.
If omitted or empty, default display name is used.
This can be used for both item and entity metadata.
display:
inside: <global item key/spawner type>Optional
Sets what is shown rotating inside the spawner.
There are 2 options:
- a global item: shows an item
- a valid spawner type: shows an entity
If omitted or invalid, no custom inside display is applied.
This can be used for both item and entity metadata.
list:
<global item key>:
weight: 1
amount: 1Defines 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: 1Defines the weighted chance of this item being selected relative to the other entries in the same list.
This is read as an integer.
amount: 1or
amount: 1-3Defines how many of that item are dropped when this entry is selected.
Accepted formats:
- single number
- numeric range
An amount of 0 is not allowed.
Item metadata uses entries from Global-items.
Global-items:
<global item key>:
material: DIAMOND
name: "<#00ffff>Custom Item"
lore:
- "<#808080>Line 1"
- "<#808080>Line 2"
enchantments:
sharpness: 5
unbreaking: 3
model: 0Global-items:
<global item key>:
...Defines one reusable item entry.
material: DIAMONDMust be a valid Bukkit material name.
If invalid, the global item fails to load.
name: "<#00ffff>Custom Item"Optional
Sets the custom item name.
If omitted or empty, the item has no custom name.
lore:
- "<#808080>Line 1"
- "<#808080>Line 2"Optional
Sets the item lore.
If omitted, the item has no lore.
enchantments:
sharpness: 5
unbreaking: 3Optional
Adds enchantments to the item.
Rules:
- the enchantment key must be valid
- the level must be between
1and127
If an enchantment name or level is invalid, the global item fails to load.
model: 0Optional
Sets the custom model data value.
If omitted, it defaults to the file’s numeric default.
Entity metadata entries are created under:
Entity-spawners:
values:
<entity metadata key>:
...Each key under Entity-spawners.values is a metadata ID.
Entity-spawners:
values:
<entity metadata key>:
display:
name: "<#ff0000>Custom %type%"
inside: ZOMBIE
applicable:
list:
- ZOMBIE
- HUSK
exclude: false
traits:
- trait: silent
value: trueEntity-spawners:
values:
<entity metadata key>:
...Defines one entity metadata entry.
applicable:
list:
- ZOMBIE
- HUSK
exclude: falseOptional
Controls which spawner types can use this entity metadata.
If omitted, empty, or fully invalid, the metadata is treated as applicable to any type.
applicable:
list:
- ZOMBIE
- HUSKOptional
List of spawner types used by the applicability filter.
Only valid spawner types are kept.
If all values are invalid or the list is empty, the metadata applies to all types.
applicable:
exclude: falseOptional
Controls how applicable.list is interpreted.
-
falseor omitted: only the listed types are allowed -
true: the listed types are blocked, all others are allowed
traits:
- trait: silent
value: trueDefines trait operations that are applied to spawned entities.
Must be a list of trait entries.
- trait: silentThe trait type.
Built-in values:
attributebabyinvulnerablenamedsilenttransform
chance: 25Optional Default: 100
Chance for the trait to attempt applying to each entity.
This is read as an integer percentage value.
limit: 2Optional Default: unlimited
Maximum number of successful applications for that trait during one execution.
Limit options:
-
0: unlimited - positive
n: applies the trait until it reachesn(limit: 5) - negative
n: applies the trait until there arenentities left (limit: -3)
The limit is checked against successful applications, not just attempts.
then:
trigger: success
traits:
- trait: silent
value: trueOptional
Defines chained traits that run after the parent trait.
The child traits only run on entities selected by the trigger.
then:
trigger: successOptional Default: always
Controls which entities from the parent trait are passed into the chained traits.
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
then:
traits:
- trait: silent
value: trueList of child traits to run when the trigger matches.
If this list is empty or invalid, the chain is ignored.
traits:
- trait: attribute
attribute: scale
value: '*0.5'Changes one attribute on the spawned entity.
attribute: scaleThe attribute to modify.
List of all attributes:
armorarmor_toughness-
damageorattack_damage attack_knockbackattack_speedblock_break_speedblock_interaction_rangeburning_timecamera_distanceentity_interaction_rangeexplosion_knockback_resistancefall_damage_multiplierflying_speedfollow_rangegravityjump_strengthknockback_resistanceluck-
absorptionormax_absorption -
healthormax_health mining_efficiencymovement_efficiencymovement_speedoxygen_bonussafe_fall_distancescalesneaking_speedspawn_reinforcementsstep_heightsubmerged_mining_speedsweeping_damage_ratiotempt_rangewater_movement_efficiencywaypoint_receive_rangewaypoint_transmit_range
If the attribute is invalid, the trait fails to load.
value: '*0.5'The shift operation applied to the current attribute value.
All shift values:
-
n: setsnas the base value -
+n: addsnto the base value -
-n: subtractsnfrom the base value -
*n: multiplies the base value byn -
/n: divides the base value byn
If invalid, the trait fails to load.
- 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.
traits:
- trait: baby
value: trueMakes an entity baby or adult.
value: true-
true: set as baby -
false: set as adult
- This only succeeds on
Ageableentities. - On unsupported entities, the trait runs but does not succeed.
traits:
- trait: invulnerable
value: trueSets whether the entity is invulnerable.
value: true-
true: invulnerable -
false: vulnerable
traits:
- trait: named
name: "<#ff0000>Elite %type%"
visible: trueSets the entity custom name.
name: "<ff0000>Elite %type%"The name applied to the entity.
You can use %type% placeholder to include the formatted spawner type.
visible: trueControls whether the custom name is visible.
-
true: always visible -
false: hidden unless the player is looking at it
traits:
- trait: silent
value: trueSets whether the entity is silent.
value: true-
true: silent -
false: not silent
traits:
- trait: transform
to: WITHER_SKELETONReplaces the spawned entity with a new entity of another spawner type.
to: WITHER_SKELETONThe spawner type to transform into.
If invalid, the trait fails to load.
Any trait can chain into more traits using then.
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