Hey there, I want to have different areas in one level where players can do everything they want. But after some time I want to reset one of these areas (not all at the same time) so I can't just make a copy of the world before the players come and just delete that and make a new copy of the normal world. I thought I could do it like this: When a player places a block, I add the position of the block to an array and when the area should be resettet, I remove all the blocks at the positions of the array. But I don't know if this is an effective way to do it and I also don't know how to reset blocks which where destroyed or replaced by the players. Maybe someone can help me, please!
Instead of moving around the entire world file, you should just move around the chunk files(16x16 parts of a map).
Is your server a survival server or some other game server? I am asking because I would like to share how I am planning to implement spleef in LegionPE. My concept was that when a player clicks on a block, broadcast the block changes to the users of that arena and cancel the event (do it at DataPacketReceiveEvent, otherwise PocketMine will resend the block to the player). This is most effective. You can simply unload the levels for the players, then PocketMine will resend them.
My server is a game server, but I don't understand what you mean. Maybe you could explain it a bit more. And how can I (when my area is a rectangle) check which chunks are between two positions?
What I meant was a framework that disables world changes. Basically, on server-side nothing is changed (so things like water flowing won't work), but client-side players can see the blocks being placed/broken. And with that, you have to disable checks like noclip check and antifly check. (The previous one cannot be disabled from a plugin)