Date: 2016/09/01 16:13:00 UTC-07:00
            
Type: Denizen Script
        
interact_chest:
    type: world
    events:
        on player closes chest:
        - define location <context.inventory.location>
        - define path "<def[location].world.name>,<def[location].y.round>,<def[location].x.round>,<def[location].z.round>"
        - flag server <def[path]>:!
        - flag server <def[path]>:|:<context.inventory.list_contents>
paste:
    type: task
    script:
    - foreach <server.list_files[schematics/].parse[replace[.schematic]]>:
        - foreach <def[value].as_chunk.cuboid.blocks[chest].parse[inventory.location].deduplicate>:
            - inventory set destination:<def[value]> origin:<server.flag[<def[value].world.name>,<def[value].y.round>,<def[value].x.round>,<def[value].z.round>]>