* Code clean up from Sonar Cloud analysis
* Fix tests
* Remove code smell
* Rename "island" which hides the field declared at line 25.
* Removed code smells.
* Rename variable record to rec
Renamed "record" variable to not match a restricted identifier.
Restricted Identifiers should not be used as identifiers. "record" is
using in Java 16.
* Added private constructor to prevent instantiation of static class
Changed variable name to rec instead of restricted "record".
* Remove Blueprint code smells.
* Use a record for database settings constructor
Code smell: Methods should not have too many parameters. I'm not sure
what methods are using this class though.
* Update MyWorlds version
The POM for MyWorlds is invalid and causes a warning, but this still
persists with this version.
* Extracted nested try block into a separate method.
Makes it clear when reading the code what might be caught
* Extracted nested try block into a separate method.
* Fixed JavaDoc /** instead of just /*
* Extracted nested try block into a separate method.
* Refactored to not assign loop counter from within the loop body.
* Better delete option. With results.
That said, this is legacy code to handle an issue that occurred a long
time ago and this whole set of code can probably be removed.
* Catch Exceptions not Throwable
* Log error with BentoBox logError
* Use computeIfAbsent
Using these instead leads to cleaner and more readable code.
* User can no longer be null
* Added the missing @Deprecated annotation and @since ref
* Added @since reference
* Merge if statements
* Use BentoBox error logging.
* Added JavaDoc @since
* Remove deprecated class and move used class
* Remove deprecated WoodType and use Type.
* Remove unused import
* Extracted nested try block into a separate method.
* Comment empty default statement
* Clean up logic; avoid switch
* Use Java instead of Guava
* private constructor to hide the implicit public one.
* Private constructor to hide the implicit public one.
Merged if statement.
* Add comment
* if merge
* Make variable constant
* Remove unused imports
* Remove deprecated and unused method
* Remove unused import
* Typo
* Remove instanceof and cast
* Remove superfluous null check
* Put constant at bottom of file because @BONNe likes it there.
* Simplify particle validation code
* Fixes#2046. Handles null players for placeholders.
* Remove unused import
* Fixes#2049 for adjacent island spaces
This also deletes blocks in the event rather than setting them to AIR as
was done previously.
Addresses #2058
We already have a option to protect against hostile mobs when logging in
or teleporting, but not respawn. This adds protection to that. Admin can
turn off the option if they want it more hard core.
In theory, this should not be required, but it seems that a player's
world might be null in some edge cases. Alternatively, the Util.getWorld
function can return a null if the player was in a nether or end but that
does not have a corresponding overworld.
Addresses #2057
This change switches from plain JDBC driver implementation to a HikariCP Pool implementation.
Pool Implementation is complete for PostgreSQL and SQLite, while MariaDB and MySQL implementation still uses JDBC drivers, however with HikariCP pools.
Also, I added extra properties for SQL databases, where users could specify their own datasource properties.
* Fixes issue when blueprint clipboard was stuck after saving.
The issue was that Map#putIfAbsent still creates a new task, even if object is already in map. The usage requires to use Map#computeIfAbsent.
* Rework blueprint and blueprint bundle names.
There was an issue with using non-english characters in blueprint names. It was not possible, as all chars for names were converted to lower cased english letters. It included display names.
I reworked it a bit and now it should be possible to set non-english names for bundles and blueprints.
Fixes#1954
The commit was wrong. Protection range should not be decreased, as that would mean that max X and Z blocks are not included in island protection bounding box.
This change is the same as 3c65194dfb but was missed when it was fixed.
Relate to #473
* Implements option to define non-existing flags in WorldSettings.
This change adds 2 new methods in WorldSettings:
* WorldSettings#getDefaultIslandFlagNames
* WorldSettings#getDefaultIslandSettingNames
These methods replace getDefaultIslandFlags and getDefaultIslandSettings methods.
Default implementation just reads values from replaced methods.
Fixes#1830
* Implement conversion from flag id to actual flag object.
Replaces flag assignment to new island based on flag id's.
Fixes#1830
* Switch from Flag object to String object in Island class.
This switch allows to keep flags that are not present in current BentoBox installation. Otherwise, unknown flags may cause an issues.
Fixes#1830
* Implement FlagBooleanSerializer.
This serializer converts input map of String, Boolean to map of String, Integer.
This map is used to read island setting flags, and integer value is not classic boolean values. (0 for true and -1 for false).
Fixes#1830
* Update to Spigot and Paper API 1.19 and Java 17
* Set minimal version to 1.18.
* Add breeding protection for Axolotl and Goats (1.18)
Add breeding protection for Frog and Allay (1.19)
* Clean up switch statement in BlockInteractionListener
* Add chest boat support to BreakBlocksListener.
Part of #1987
* Add powdered snow pickup with bucket protection.
* Add glow ink sac protection on signs.
Switch to SheepDyeWoolEvent as it now contains player variable.
* Clean up Hurting Listener
* Mark 1.16.5, 1.17 and 1.17.1 as incompatible.
Mark 1.18, 1.18.1 and 1.18.2 as supported.
Add 1.19 as compatible.
Part of 1987
* Add ChestBoat inventory protection.
Part of #1987
* Clean up LockAndBanListener
* Add MANGROVE_PRESSURE_PLATE protection.
Part of #1987
* Add Glow Item Frame protection to player interact event.
* Clean up MobSpawnListener
* Clean up ChestDamageListener
* Change from custom method to Tag.PRESSURE_PLATES to detect pressure plates.
Part of #1987
* Implement proper chest boat protection.
Part of #1987
* Move to 1.19 R1 world regenerator.
Part of #1987
* Add allay to the animal entity list.
Part of #1987
* Add axolotl and other fish scooping protection.
Part of #1987
* Fixes Bucket and Glass Bottle filling.
Buckets and bottles were not working since cauldron splitting by type. This change fixes that.
It also protects from filling bottles with water from water sources or waterlogged blocks.
* Remove 1.17.1 compatibility check for biome adapter.
Add cheezee 1.19.1 compatibility version.
* Fixes chest boat interactions.
Part of #1987
* Implement Allay protection.
New flag ALLAY is required to interact with allays.
Part of #1987
* Prevent visitors for being targeted by entities if ENTITY_ATTACK is enabled.
* Implement Sculk Sensor and Shrieker activation protection setting.
Part of #1987
* Add music discs to the LangUtilsHook
Part of #1987
* Fixes failing unit-tests.
If create-and-link-portals is true, then teleporting to the nether will
not go to a central portal point and instead create a portal in the
nether at the same coordinates as the portal in the overworld.
Teleporting back will not be affected.
https://github.com/BentoBoxWorld/BSkyBlock/issues/464
* delete island one by one
* register before IslandDeletionManager
* optimize imports
* setting
* just some indents
* config
* run synchronously
* a bit reformat before recoding
* proper delete chunks
* comment
* combine the task call
* expose the NMS Handler
* don't have to try-catch this
* we know that this is final
* expose copy chunk data so that it can be overridden
* Don't have to use Vector
* set block from minimum height
* remove NMS and use fallback if not set
* only get the height once
* fix test
* Mark all home-related methods in PlayersManager as deprecated.
* Fix bug where maxHomes was shown as null
* Version 1.18.0
API changes may break compatibility with Addons.
* Remove usage of deprecated methods except for migration code.
* Prevent NPE. Check isPlayer instead of getWorld() == null
* Fix nullability issue and added to @Deprecated annotations
* Added deprecation notices to home methods in Players
* Fix hanging [uuid] in info.
* NPE checking
* Make getProtectionCenter nonNull
* More NPE fixes.
* Fix test
* Make getPlayer() and getOfflinePlayer() nonNull returns
This requires addons to not use null checks and instead us the isPlayer
or isOfflinePlayer methods.
* NPE blockers
* Deprecate CompositeCommand isPlayer method.
* Fix test