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.
They respectively got renamed to Island#ban() and Island#unban(). They now require the UUID of an issuer (which can be null, but it's better to provide one)
AddonDescriptionBuilder has been renamed to AddonDescription.Builder ; and there is no longer public constructors in this class.
This change is obviously API breaking, but it's relatively "internal", so hopefully people didn't use it.
Speed of schem pasting is in the config.yml of BentoBox.
Old schems will work and paste async, but attached blocks, e.g.,
torches, may fall off due to being pasted ticks before the supporting
block is pasted. Newer schems will not have this issue.
Further work is needed to optimize entity pasting.
Known issue: if a player logs out during the pasting, things go wrong
until the next reload. Needs investigation and mitigation.
There's no mitigation against the server shutting down or crashing
mid-paste.
This was a bigger job than expected. I moved the addon loading locale
stuff into the LocalesManager class from the AddonsManager and put a jar
file lister in Utils. There could be some more combining of plugin jar
and addon jar file finding there. Finally, I added a sophisticated test
that creates a temporary addon jar with a locale file and checks that it
is saved correctly. Phew!
Flag was marked as deprecated, which may be okay, but because it caused
a lot of warnings in the tests because they bypass the builder I removed
the deprecation but kept the warning in the JavaDoc.
This will load all schems in an add-on's schem folder if it exists and
associate them with this world set (overworld, nether and end). Schems
can be named anything, but the partner nether or end worlds must be
pre-fixed with "nether-" or "end-" in the filename.
Additional schems can be added by the admin into the schem folder, or
they can be stored in the jar file of the add-on. Both are supported.
No changes are required to current add-ons. I.e., there is no API
breakage here, but I would like to rename the SchemsManager method
loadIslands(World world) to be loadSchems(World world) in the future.
Related issues/PR:
https://github.com/BentoBoxWorld/BentoBox/issues/104https://github.com/BentoBoxWorld/BentoBox/issues/207https://github.com/BentoBoxWorld/BentoBox/issues/378https://github.com/BentoBoxWorld/BentoBox/pull/408
This will improve the consistency of the code, as well as the Javadocs.
Locales (and some other files) still need to be updated to remove these references to team leader.
Fixes#281
Replaced Addon#setEnabled(boolean) with Addon#setState(Addon.State).
Now, if an exception gets thrown while enabling an addon, it'll automatically stop enabling it and set its state to "INCOMPATIBLE" or "ERROR". These values could later be get to be displayed in the version command.
I edited it so it only happens on BentoBox's panels. Having it closing "every" inventory was causing issues with vanilla inventories (crafting table, etc...)
I could not fix the related tests though : PanelListenerManagerTest#testOnInventoryClickOutside (PanelListenerManagerTest.java:128) is failing every time.
Removed purge-related settings.
Renamed all database-related settings and methods to replace `db` with `database`.
Moved confirmationTime to `island.confirmation.time`.
Renamed inviteWait, banWait and resetWait to inviteCooldown, banCooldown, resetCooldown. Also moved them under `island.cooldown.x`.
Removed kickWait and leaveWait, using confirmationTime instead.
Moved `island.require-confirmation.<command>` to `island.confirmation.commands.<command>`.
Updated tests.
Updated getters and setters using code automation. Sadly, this wiped out all the Javadoc.
Also commented out CellState.RESERVED.
That was a tough one. I had to rewrite IslandGrid#getIslandAt(int, int) quite a few times before using the stream() thing. I tested it a bit - it seems it is working like a charm.
I just hope that it won't be something useless - another plumbing change that adds nothing. It shouldn't - because of the "RESERVED" thing - but, well... it's been quite a hard thing!
Hopefully, this is the last API breaker. I renamed the classes that
started with BSB to be just BB (bentobox). I now have to fix all the
add-ons I just broke...
Added reference about and info commands. These command run across worlds
and currently have no perms associated with them.
The main point was to enable BentoBox to have is own commands.
This API enables any command to have a cool down and to have that cool
down called by another command. For example, the Kick command sets the
cool down on the Invite command. It is possible for commands to set cool
downs on themselves too.
Currently, cool downs are not stored persistently in the database so
they disappear if the server is reloaded. This should be okay for now.
There are some weird NPE's that I couldn't work out in the test classes.
They do not occur when the class is run by itself, only when it is run
with all the others so I don't know why it is happening.