Is there a way to save blocks inside code without having to create a backup and then reset those blocks again?
Upon block related events, save original blocks into an array and place the original blocks when you want to restore it.
I guess you can sort the blocks out depending on block ID, Y coordinate or player who triggered it, or you can make a new array when the other arrays have 100 data stored, but either way, you would end up with a large amount of data. Does something bad happen if there are too many objects in one array, though?