Hi, For a plugin I'm making, I would like to know what the best way would be to refill all chests in the arena (or world). Is there perhaps a good plugin with an API that I can use, or do I have to write it myself? And if I have to, what would be the best approach? How would I find all chests in the area / world and what's a good way to refill them randomly? Thanks in advance. Rprrr
The best way is to listen to the block break and place event, check if it's a chest and add the location to a file or remove it respectively. Then when you run the refill just load the chuck of the location, fill the chest and unload the chunk if it was not loaded when you ran it. EDIT: Remembered why it seemed so easy for me to think how to code it yesterday. I've done it before