I’m making a chunk protection plugin for my server. The original idea was to have a map of Chunk::getUniqueId to ProtectedRegion. When an event is fired get the ProtectedRegion from the chunks uuid then test if the player can build in that region. I wanted the plugin to be very simple and extremely efficient.
Turns out that you cannot get the chunk or even the chunk’s uuid directly from the event. On top of that, the whole ChangeBlock event bus seems inefficient and is clunky to program with.
My question is what is your guy’s take on this? Is there another cached chunk key I can use? Can I take this lower level? This is a proprietary plugin only meant for my server so I can do pretty much anything. How about this cool mixin stuff? Would you approach the whole chunk protection a different way?
I’m just curious on what your approach would be to this problem. I don’t usually worry about performance but I want this to be as efficient as possible.
I’m very new to Sponge, I just started porting my plugins and I’m loving it so far. Would love some help from you guys!
Thank you