mob_spawner_events: type: world debug: true events: on player places mob_spawner_completed: # - [check if item is valid] - if !: - determine passively cancelled - narrate "<&4>This item was not marked correctly when created, please contact staff to claim a replacement." - stop - else: # - [set the entity type of the spawner] - define type - wait 1t - adjust spawner_type:<[type]> - flag server .spawner on player breaks spawner: # - [check for enchantment/item type] - if ! || !: - determine passively cancelled - ratelimit 2s - actionbar "<&4>You must have silk touch pickaxe to break this!" - playsound sound:entity_villager_no volume:2 - else: # - [if vanilla spawner, give fragments] - if !.spawner]>: - determine # - [ if not, give spawner with entity type attached] - else if .spawner]>: - define Type - determine "].with[display_name=<&a><[Type]><&b> Spawner]>" - flag server .spawner:! - else: # - [ if neither, something bork and get halp] - determine passively cancelled - narrate "<&4>This location was not marked correctly when the spawner was placed. Contact staff to claim a spawner replacement please."