Commit Graph

270 Commits

Author SHA1 Message Date
tastybento
1b2748f920 Version 1.24.2 2023-08-01 09:43:31 -07:00
tastybento
988ace8329 Update to latest Jacoco 2023-07-10 21:18:58 -07:00
tastybento
5953df9dbb Version 1.24.1 2023-07-08 08:33:24 -07:00
tastybento
e9067cfb28 Add bbox admin perms command and adjust perms for commands
Made some admin commands have their own perm so that they can be
controlled  individually by permissions.
2023-06-18 13:55:21 -07:00
tastybento
6932ce3759 Added support for 1.20 2023-06-10 10:03:17 -07:00
tastybento
7bb1907897 Version 1.24.0 2023-06-06 18:41:06 -07:00
tastybento
5f6b91bc64 Version 1.23.3 2023-05-28 12:11:27 -07:00
tastybento
f52150ec1d Version 1.23.2 2023-04-18 16:22:15 -07:00
tastybento
8d0fcf0169 Version 1.23.1 2023-04-18 14:33:20 -07:00
tastybento
ba19b08f4c Version 1.23.0 2023-04-07 17:28:02 +01:00
tastybento
1a293a6936
Implements NMS for pasting and supports older versions of server (#2110)
* Implements NMS for pasting and supports older versions of server

* Remove trial code that shouldn't have been committed.

* Remove trial code that shouldn't have been committed.

* Remove 1.19.3 support.

* Use 1.19.4 in POM
2023-03-26 10:05:54 -07:00
tastybento
6894695024 Clean up test classes; use latest API 2023-03-23 11:02:08 -07:00
tastybento
2cb561b943
Update to 1.19.3 for NMS (#2107)
* Update to 1.19.3 for NMS

Clean up some imports and deprecation notifications.

* Added 1.19.4 to compatible servers
2023-03-18 10:28:19 -07:00
tastybento
2b40ae47d7 Update Spigot version 2023-03-04 23:35:39 -08:00
tastybento
a713b7be07 Version 1.21.1 2023-02-12 15:21:32 -08:00
tastybento
b62a1862a2 Add ${argLine} to surefire plugin
This should fix the coverage reports.
2023-02-08 17:17:12 -08:00
tastybento
6c8ccd2a57 Attempt to get coverage report from SonarCloud 2023-02-05 17:23:52 -08:00
tastybento
0e5db0f41f Quiet excessive warnings from JavaDoc plugin 2023-01-01 09:19:20 -08:00
tastybento
056cff4b6f
Code clean up from Sonar Cloud analysis (#2068)
* 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
2022-12-31 16:41:17 -08:00
tastybento
18983e5570
Code cleanup (#2065)
* Cast operands to (double)

* Code clean up from static analysis

* Revert the GitHubAPI version change because it didn't work.
2022-12-29 10:01:25 -08:00
tastybento
70262be896 Update to latest AuthLib 2022-12-28 12:42:58 -08:00
tastybento
bde294e0e6 Updated some dependency versions
https://github.com/BentoBoxWorld/BentoBox/issues/2064
2022-12-28 12:37:33 -08:00
tastybento
e7f1269443
Support for 1.19.3 (#2060) 2022-12-11 17:51:52 -08:00
Irmo van den Berge
ac4922534e
Register BentoBox World Generator option with MyWorlds (#2039)
Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
2022-10-19 11:27:12 +03:00
BONNe
369001d368
Rework SQL database implementation. (#1993)
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.
2022-10-04 12:31:51 +03:00
BONNe
4792ff3f62 Init version 1.22 - Customizable GUI's version. 2022-10-04 12:11:17 +03:00
BONNe
c7b48b3d2a
Update Spigot 1.19.2. (#2017)
Add 1.19.2 compatibility.
2022-08-26 12:17:19 +03:00
Sliman4
3cd5b05130
Fix Actions (#1992)
* Move to new EngineHub maven repository

* Remove unused WorldEdit dependency

* Use Java 17 in GitHub Actions

* Also change maven-compiler-plugin and maven-javadoc-plugin versions to 17
2022-06-16 14:57:42 +03:00
BONNe
85b52f4bfb
Implement new 1.19 materials and entities (#1990)
* 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.
2022-06-14 00:38:53 +03:00
BONNe
aad10ad74f
Move database dependencies to the Spigot Libraries. (#1982) 2022-05-29 22:56:50 +03:00
Huynh Tien
6fba4bfbea
More abstract on World Regenerator (#1969)
* more abstract on delete chunks

* update NMS to 1.18.2

* at most abstract, requires only the island and the world

* it's weird that we can't use whenComplete

* rename to WorldRegenerator
2022-05-02 15:23:31 -07:00
BONNe
385aed02cd
Update to next BentoBox version 2022-04-26 12:07:44 +03:00
tastybento
5910aa2685 Version 1.20.1 2022-02-19 11:19:33 -08:00
tastybento
73a432d75c Put NMS dependency back in to POM. 2022-02-19 10:05:57 -08:00
tastybento
7b94aa0ea2
Adds bonus range elements to Island object. (#1921)
* Adds bonus range elements to Island object.

Admin commands still need to be adjusted or added to support management
of the bonus ranges.

* Changed to mutable class

Fixed bugs.
2022-01-28 18:35:55 -08:00
Huynh Tien
ce1d8e5117
Rework the chunk deletion (#1897)
* 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
2022-01-01 17:38:27 -08:00
tastybento
bf62f18de5 Version 1.20.0 2021-12-31 10:49:46 -08:00
tastybento
cec58c7a45 Version 1.19.1 2021-12-13 21:59:11 -08:00
tastybento
59de6a8efb
Update to Minecraft 1.18 (#1887) 2021-12-05 21:03:21 -08:00
tastybento
11a3bf9227
Release 1.18.1 (#1886)
* Version 1.18.1

* Added snapshot repo to Maven info.

* Fixes console teleporting.

https://github.com/BentoBoxWorld/BentoBox/issues/1877

* Address potential NPE's

* Preveent NPEs and other items.

* Remove dead paper forks (#1884)

Tuinity has since merged with Paper, and is now not a valid fork

Airplane is shutting down / not updating to 1.18.x

* Added toString to resolve issue with arrays

* Fix minor JavaDoc mistake

Co-authored-by: Fredthedoggy <45927799+Fredthedoggy@users.noreply.github.com>
2021-12-05 13:46:54 -08:00
tastybento
7b1c19c084 Version 1.18.1 2021-11-11 10:41:16 -08:00
tastybento
df2b445002
Release 1.18.0 (#1876)
## Change Log 

* Island range perms could be 2x island distance

This could allow protection ranges to be much greater than the island
range and therefore overflow into adjacent islands.

https://github.com/BentoBoxWorld/BentoBox/issues/1851

* Ensure maxEverProtectionRange is less than range.

https://github.com/BentoBoxWorld/BentoBox/issues/1851

* Added test class for Island.

* Added access to private fields for JUnit tests

* Added Sonar Properties to POM

* Changes to analyze using sonar.

* Remove zip reference

* Avoid zipSlip vulnerability.

* Removed the unused WorldEdit hook. (#1853)

If someone wants to add it back later they can, but this code does
nothing right now.

* Requires nonNull parameters for User.instanceOf (#1852)

* Requires nonNull parameters for User.instanceOf

The only reason why User.instanceOf was returning a potential null was
if the parameter was null. Further absolutely no null checking was being
done, so the assumption was that User.instanceOf should never return a
null. This corrects the annotations and requires non-Null parameters.

* Remove null player test

* Fix JavaDoc for GameModeAddon inWorld method

* Fix max-range bug

* Remove illegal tag as it's not needed

* Code smell reduction

* Add missing packages so tests can pass.

* Non null user methods (#1856)

* This makes some User methods non-null.

Instead of returning null, some methods will throw an error if they are
called on non-Players. This means code does not have to do null checks.

* Perform null check in method.

* Null check

* Fix test

* Fix test.

* Npe squashing (#1857)

* 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

* Use isPlayer instead of null check.

Refactor code to be easier to understand.

* Fix

* Fix some code smells.

* Prevent NPE possibility.

* Fix "ugly" enchant name. (#1858)

Enchant names did not have a touch of Util#prettifyText code.

* Remove deprecated events.

* Fix IslandSethomeCommand test

* Fix tests - just counts of events.

* Added API to get a translation without color conversion

It may be necessary to read the translation without converting colors to
Bukkit colors.

* Fix tests.

* Fix test.

* Version NPE protections.

* 1.18.0 (#1860)

* 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 missing color conversion for translations.

* Fix mis-statement of island protection coordinates in info command.

* Fix tests

* Fix missing edge deletion of island.

The bounding box was erroneously being made smaller when it was not
required because the inBounds check does that already.

https://github.com/BentoBoxWorld/BentoBox/issues/1863

* Prevent rare NPE

* Ensure oldIsland is never null.

* Refactored setowner command and added test class

* API: Require getWorldSettings to be a game mode world

* Fix tests and refactor code

* Fix test

IWM inWworld needs to return true

* Fix test

IWM inWorld must return true

* Put default getHandlers back in for backwards compatibility

Without them, too many older addons break. They need updating to have
their own handlers. Once that is done, the default ones can be removed
maybe.

* Refactor code for clarity.

* NPE protections

* Prevent NPE

@Poslovich - you were right!

* Throw an error if player is null

* Prevent NPE

* Prevent NPE

* Do a null check

* World should never be null.

* Require non-null world

* Require owner to be non-null. It should never be null

* Prevent NPEs

* Clear the going home flag for edge cases

There were a few potential times when the flag may not have been
cleared. These were mostly teleport failure scenarios. Hopefully, this
is all of them.

https://github.com/BentoBoxWorld/BentoBox/issues/1864

* Shift priority of EntityPortalEnterEvent to HIGH

https://github.com/BentoBoxWorld/BentoBox/issues/1866

This will allow other plugins running at NORMAL to cancel the event
before BentoBox does something.

* Increase priority of EntityPortalEvent listener

https://github.com/BentoBoxWorld/BentoBox/issues/1866

* Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1868

* Code refactoring around User.getInstance(player)

Co-authored-by: BONNe <bonne@bonne.id.lv>
Co-authored-by: Fredthedoggy <45927799+Fredthedoggy@users.noreply.github.com>
Co-authored-by: Justin <jstnf@users.noreply.github.com>
Co-authored-by: gecko10000 <60494179+levtey@users.noreply.github.com>
2021-11-08 21:28:12 -08:00
tastybento
d780bbd4c0
1.18.0 (#1860)
* 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
2021-09-26 13:35:18 -07:00
tastybento
cad7dc1666 Add missing packages so tests can pass. 2021-09-18 10:50:21 -07:00
tastybento
4f22df069b Remove illegal tag as it's not needed 2021-09-18 08:15:07 -07:00
tastybento
5b838d0668 Remove zip reference 2021-09-12 21:03:49 -07:00
tastybento
005007b0db Changes to analyze using sonar. 2021-09-12 20:54:30 -07:00
tastybento
5c063a692d Added Sonar Properties to POM 2021-09-12 20:22:43 -07:00
tastybento
c7a1220028 Added access to private fields for JUnit tests 2021-09-12 17:54:29 -07:00
tastybento
2b452cddbd Version 1.17.4 2021-09-11 16:45:01 -07:00