Code:
command /chester:
permission: OP
trigger:
loop blocks within {skywars::pos::1} to {skywars::pos::2}:
if loop-block is trapped chest:
add 1 to {_n}
set loop-block to {sw.trapped_chest.arena::%{_n}%}
add apple to inventory of block at {sw.trapped_chest.arena::1}
add apple to inventory of block at {sw.trapped_chest.arena::2}
add apple to inventory of block at {sw.trapped_chest.arena::3}
add apple to inventory of block at {sw.trapped_chest.arena::4}
add apple to inventory of block at {sw.trapped_chest.arena::5}
add apple to inventory of block at {sw.trapped_chest.arena::6}