The default BentoBox locale text is geared towards island games. When
writing the SkyGrid addon I am using the standard protection flags, but
I need to reference a "protection area" instead of an "island". This
enables me to do that by having the same reference but prefixed in the
locale file by the name of the addon (in lower case), as written in the
addon's addon.yml.
Implemented a FIFO to queue async save requests for YAML and MySQL.
The assumption is that most database objects will be held in memory
because the ordering of object loading is not handled. That means that
it is theoretically possible to load something on the main thread before
it has been saved in the async thread if you are really quick. So, in
general, you should load objects once and ideally never load them again
unless there's a big span of time in between so the async can finish.
For most situations, this race condition should not occur, but I'm just
warning about it.
Saving on shutdown is not async and takes as long as it takes.
Also added some defensive code to disable the plugin if the database
connection info is wrong and print an error message instead of lots of
errors.
Changed CleanSuperFlatListener to use a LinkedList for its queue.
Note: If using the User class in a test, you MUST set the mock plugin object using the User.setPlugin() method otherwise each test will use the wrong plugin object and verifications will not work.
Island deletion is done a few chunks at a time per tick. Current speed
is 5 chunks per tick per world (e.g., 15 chunks per tick if nether and
end islands are used).
Chunks are deleted based on the all-time maximum protection range of the
island. This is because the protection range can grow bigger or smaller
over the island's lifetime. To ensure all possible chunks are erased,
the largest every protection range is remembered and used.
Very large protection ranges will take a long time to fully delete.
Info on islands that are being deleted is stored in the database. If the
server shuts down mid-deletion, deletion will restart when the server
restarts.
While an island is being deleted, new islands cannot occupy that spot
and the spot cannot be reserved by the admin.
In addition, async approaches to island saving and player saving were
removed. Async will be implemented another way.
Now, instead of saving the full island or player database, individual
database entries are saved instead to be more efficient.