Commit Graph

3350 Commits

Author SHA1 Message Date
tastybento
1953caa7c5 Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1868 2021-10-30 13:44:34 -07:00
tastybento
8752e19e5d Increase priority of EntityPortalEvent listener
https://github.com/BentoBoxWorld/BentoBox/issues/1866
2021-10-26 20:49:38 -07:00
tastybento
6aa7869b17 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.
2021-10-23 16:39:36 -07:00
tastybento
930433b64b 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
2021-10-16 20:44:18 -07:00
tastybento
731d902d98 Prevent NPEs 2021-10-11 18:02:23 -07:00
tastybento
1a802a7510 Require owner to be non-null. It should never be null 2021-10-11 17:56:06 -07:00
tastybento
37e7846908 Require non-null world 2021-10-11 17:55:04 -07:00
tastybento
28a2ecfcfa World should never be null. 2021-10-11 17:52:38 -07:00
tastybento
081f74544b Do a null check 2021-10-11 17:48:41 -07:00
tastybento
2ffa4c9874 Prevent NPE 2021-10-11 17:43:04 -07:00
tastybento
907c6b3534 Prevent NPE 2021-10-11 17:27:24 -07:00
tastybento
8852b9d660 Throw an error if player is null 2021-10-11 17:21:07 -07:00
tastybento
765f774652 Prevent NPE
@Poslovich - you were right!
2021-10-11 17:15:51 -07:00
tastybento
db464d5c04 NPE protections 2021-10-09 11:40:15 -07:00
tastybento
f37226b115 Refactor code for clarity. 2021-10-09 11:20:48 -07:00
tastybento
536d7ef1c3 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.
2021-10-09 09:29:52 -07:00
tastybento
d3e7b55be5 Fix test
IWM inWorld must return true
2021-10-08 17:27:52 -07:00
tastybento
665724e825 Fix test
IWM inWworld needs to return true
2021-10-08 17:25:20 -07:00
tastybento
fe2e9e1a9e Fix tests and refactor code 2021-10-08 17:15:41 -07:00
tastybento
b5d9d2e52e API: Require getWorldSettings to be a game mode world 2021-10-03 20:33:50 -07:00
tastybento
cfad9879a5 Refactored setowner command and added test class 2021-10-03 19:20:45 -07:00
tastybento
3a43c40634 Ensure oldIsland is never null. 2021-10-03 16:16:58 -07:00
tastybento
60c62a5967 Prevent rare NPE 2021-10-03 16:08:49 -07:00
tastybento
3c65194dfb 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
2021-10-03 15:50:18 -07:00
tastybento
a1c3f78293 Fix tests 2021-10-03 15:46:11 -07:00
tastybento
b5fd992fa7 Fix mis-statement of island protection coordinates in info command. 2021-10-03 15:29:57 -07:00
tastybento
bc6ec36f87 Fix missing color conversion for translations. 2021-10-03 15:04:14 -07: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
f66eeed4a1 Version NPE protections. 2021-09-25 16:42:54 -07:00
tastybento
3236c68e5c Fix test. 2021-09-25 09:42:51 -07:00
tastybento
500f7292c6 Fix tests. 2021-09-25 09:34:02 -07:00
tastybento
af3c0a874c Added API to get a translation without color conversion
It may be necessary to read the translation without converting colors to
Bukkit colors.
2021-09-25 08:47:14 -07:00
tastybento
0a4fc83218 Fix tests - just counts of events. 2021-09-25 08:33:07 -07:00
tastybento
8b474833e1 Fix IslandSethomeCommand test 2021-09-25 08:07:15 -07:00
tastybento
bc737d4d66 Remove deprecated events. 2021-09-25 08:00:04 -07:00
tastybento
3d2a99c036 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2021-09-25 07:51:13 -07:00
BONNe
16d5775c84
Fix "ugly" enchant name. (#1858)
Enchant names did not have a touch of Util#prettifyText code.
2021-09-22 19:35:22 -07:00
tastybento
690ea2f99e Prevent NPE possibility. 2021-09-19 18:36:37 -07:00
tastybento
29fa03976c Fix some code smells. 2021-09-19 18:29:19 -07:00
tastybento
f6f5b63110 Fix 2021-09-19 08:45:19 -07:00
tastybento
110a282deb Use isPlayer instead of null check.
Refactor code to be easier to understand.
2021-09-19 08:42:37 -07:00
tastybento
53f02ae686
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
2021-09-18 17:59:32 -07:00
tastybento
b247b360bf Fix test. 2021-09-18 12:25:25 -07:00
tastybento
68890eba00 Fix test 2021-09-18 12:25:14 -07:00
tastybento
8eac5070f0 Null check 2021-09-18 11:37:33 -07:00
tastybento
25fe86d812
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.
2021-09-18 11:22:28 -07:00
tastybento
cad7dc1666 Add missing packages so tests can pass. 2021-09-18 10:50:21 -07:00
tastybento
8eb45e817c Code smell reduction 2021-09-18 08:15:15 -07:00
tastybento
4f22df069b Remove illegal tag as it's not needed 2021-09-18 08:15:07 -07:00
tastybento
3282b1bd12 Fix max-range bug 2021-09-18 08:14:43 -07:00