Commit Graph

609 Commits

Author SHA1 Message Date
Florian CUNY
37a4145322 Added specific messages when entering/leaving an island the player is member of
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1084
Improved color codes for existing messages
2020-01-17 13:34:05 +01:00
tastybento
c7e0492612 Fixed bug (sonar cloud) and improved test PortalTeleportationListener 2020-01-14 15:01:19 -08:00
tastybento
8b27003cfb Stops velocity for player going through end portal to end
https://github.com/BentoBoxWorld/BentoBox/issues/1118
2020-01-10 15:41:59 -08:00
tastybento
7a7641354f Compiling under Java 9+ (#1112)
* Compiles in Java 11

* Compile under Java 11 only.
2020-01-10 23:12:37 +01:00
tastybento
1c500a0c05 Redstone on islands will operate if mods or ops are present
even if the offline redstone flag is active and no team members are
online. This enables staff to bypass the "Offline Redstone" feature,
which means if staff need to moderate players islands then redstone is
an issue.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1102
2020-01-07 17:20:04 -08:00
tastybento
a3a0efb3a3 Removes only team members from island.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1096
2020-01-07 13:12:53 -08:00
tastybento
aa5c253e03
Fix for double calling of events (#1111)
* Fixes tests for AdminSetrankCommand

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

* Fixes double calling of events.

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

* Makes AddonEvent static

https://github.com/BentoBoxWorld/BentoBox/pull/1111
2020-01-07 10:15:12 -08:00
tastybento
28200a44a8 Removed unused imports 2020-01-06 11:22:37 -08:00
Florian CUNY
a0718f0e6b Added a 3rd optional "island owner" argument to AdminSetrankCommand
Implements https://github.com/BentoBoxWorld/BentoBox/issues/787

This allows to coop or trust players on another player's island.
Related tests are ignored due to a lack of time to fix them.
2020-01-05 17:45:53 +01:00
Florian CUNY
ceef422c54 Improved tab-completion for AdminSetrankCommand
Relates to https://github.com/BentoBoxWorld/BentoBox/issues/787
2020-01-05 13:38:18 +01:00
Florian CUNY
fab6b295b6 Fixed tests 2019-12-31 14:38:49 +01:00
Florian CUNY
53d728af94 Added LECTERN protection flag
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1094
2019-12-31 14:06:49 +01:00
Florian CUNY
4a209d875e Fixed players being stuck in SPECTATOR gamemode when accepting invite 2019-12-30 16:17:10 +01:00
tastybento
21eeedbbb0 Fixes addon disablement in onEnable.
Clean up imports.

https://github.com/BentoBoxWorld/BentoBox/issues/1090
2019-12-29 05:55:57 -08:00
Florian CUNY
fbceaa51d3 Improved UserTest#testHasPermission() 2019-12-23 14:06:56 +01:00
Florian CUNY
fc23da4343 Added Util#isInteger() and made commands use it for more reliability 2019-12-21 14:23:32 +01:00
Florian CUNY
1d486efbe7 Added AdminRangeAddCommand, AdminRangeRemoveCommand
Implemented https://github.com/BentoBoxWorld/BentoBox/issues/1072

Moved the various "invalid-value" messages to the admin range node in en-US.
Made AdminRangeSetCommand use the more generic 'must be positive number' message - causes issues with floats, which I will fix later on.
2019-12-21 11:34:38 +01:00
Florian CUNY
3e65f5e902 Fixed admin range set/reset commands not working if player is in team
Updated tests
2019-12-21 10:57:17 +01:00
tastybento
1058f2dd64 Fixed tests for IslandTeamInviteAcceptCommand 2019-12-20 16:50:59 -08:00
tastybento
a025271629 Fixed message on trusting a player.
https://github.com/BentoBoxWorld/BentoBox/issues/1073
2019-12-17 11:30:59 -08:00
tastybento
c3442c29ba Reworked how new island spots are found.
Fixed bug where max attempts check was not working, which could cause a
timeout crash.

https://github.com/BentoBoxWorld/BentoBox/issues/1057
2019-12-15 14:41:59 -08:00
Florian CUNY
30abc0e6a8 Fixed tests 2019-12-14 11:39:51 +01:00
tastybento
a82e6bbdc0 Cleaned up EggListener test code. 2019-12-08 12:03:58 -08:00
tastybento
3dc836bbfe Fixed IslandCache test class.
Added mock to make island.isOwned() true.
2019-12-08 11:58:34 -08:00
tastybento
a42da35174 Fixed AdminPurgeCommand test class.
Added mock for island.isOwned() and island.isUnowned() methods.
2019-12-08 11:56:12 -08:00
tastybento
eb06b39b4a Fixed EnterExitListener test class.
Added island.isOwned() mocking.
Added 2 test cases to handle unowned island testing.
2019-12-08 11:52:33 -08:00
Florian CUNY
3e81b4a3cf Fixed tests and ignored some that are throwing null mocks errors 2019-12-07 18:21:32 +01:00
tastybento
3f1d6d16ff Added Mockito.framework().clearInlineMocks() to all test classes per
https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2

This is just e defensive measure and may not have an affect on any
particular class.
2019-12-06 08:29:29 -08:00
tastybento
4b9b24e121 Fixed issue where Ops and mods had to stand still on teleport
https://github.com/BentoBoxWorld/BentoBox/issues/1059
2019-12-05 23:37:45 -08:00
tastybento
e511d1b9e9 Fixes banlist command number in unlimited case
Added test methods to confirm operation.

https://github.com/BentoBoxWorld/BentoBox/issues/1060
2019-12-05 22:37:03 -08:00
tastybento
294ed23225 Remove unused imports 2019-12-01 08:37:39 -08:00
tastybento
7c3e81cc5e Fixes JoinLeaveListenerTest failure. 2019-11-30 18:37:11 -08:00
tastybento
032b5c2988
Allows a space to be placed after a color code in locale files. (#1045)
Space will be stripped if it exists. This makes GitLocalize able to
machine translate much better.

Changes to the English locale file was made. Other languages do not have
to add spaces. Note that adding or removing spaces from files is easy
with regex.

https://github.com/BentoBoxWorld/BentoBox/issues/1044
2019-11-30 16:17:38 -08:00
tastybento
7737456309 Fixes issue with island protection range and permissions.
Permissions could set the island protection range greater than the
island distance.

This commit also fixes the User method that calculates the max value
from a permission. The default value was being used as the starting
point rather than 0, so it was not possible to set perms to go less than
the default value.

Added test clases around all these items.

https://github.com/BentoBoxWorld/BentoBox/issues/1047
2019-11-28 21:48:07 -08:00
tastybento
5f52b32cd3 Enables operation on 1.13.2 servers.
Avoids use of AbstractVillager for now. Alternative to PR
https://github.com/BentoBoxWorld/BentoBox/pull/1035
2019-11-25 21:17:41 -08:00
tastybento
b3dde9ad3e Fixes blueprint clipboard manager test. 2019-11-25 20:18:49 -08:00
tastybento
ff60127762 Sanitizes blueprint and bundle names
https://github.com/BentoBoxWorld/BentoBox/issues/1038

Allows spaces to exist in the bundle names.

Added tests to check for bad chars and foreign chars in names.
2019-11-25 19:57:11 -08:00
tastybento
0e6061455f Fixes flow into adjacent islands when island abut.
https://github.com/BentoBoxWorld/BentoBox/issues/1034
2019-11-24 13:45:18 -08:00
tastybento
df40c3477c Verifies material exists on server and if not supplies AIR.
https://github.com/BentoBoxWorld/BentoBox/issues/1037
2019-11-20 18:02:30 -08:00
tastybento
336f4e9bd4 Explicitly cancels the portal if there is no nether or end.
https://github.com/BentoBoxWorld/BentoBox/issues/1036
2019-11-20 17:08:04 -08:00
tastybento
4753681b47 Fixes flow out of water logged blocks like slabs.
The check `isLiquid()` does not work for water logged blocks like slabs
or fences so it was possible for players to get liquids outside of the
the island.

https://github.com/BentoBoxWorld/BentoBox/issues/1034
2019-11-17 17:45:51 -08:00
tastybento
cd7b02fdf2 Excludes spawn island from offline redstone prevention flag
https://github.com/BentoBoxWorld/BentoBox/issues/1031
2019-11-16 10:22:46 -08:00
tastybento
2c8739a48b Fixes damage to wandering traders.
https://github.com/BentoBoxWorld/BentoBox/issues/1029
2019-11-14 18:05:55 -08:00
tastybento
f67baf6501 Add protection for firework explosions from crossbows.
https://github.com/BentoBoxWorld/BentoBox/issues/1027
2019-11-14 17:44:56 -08:00
tastybento
c9b0c74d08
Paper lib (#1026)
* Remove unused imports

* Implements PaperLib within bentobox

* Added PaperLib methods to Util for addons to call

* Uses PaperLib for island deletion

* Point to https://github.com/BentoBoxWorld/MVdWPlaceholderAPI in POM
2019-11-13 15:10:33 -08:00
Florian CUNY
a1b7df19c7 Added WorldSettings options to create island on first login
Implements https://github.com/BentoBoxWorld/BentoBox/issues/889
2019-11-09 17:50:27 +01:00
tastybento
21e75c645e Return to previous code for BlockInterationListener 2019-11-06 08:32:06 -08:00
tastybento
21916b5a59 Remove code smells. 2019-11-05 23:11:56 -08:00
tastybento
ef67079831 Fix for tests.
Note Flags cannot be used in class definitions without becoming nulls.
They have to be done in the constructor.
2019-11-05 22:36:28 -08:00
tastybento
c56b9bec18 Refactorer BlockInteractionListener and added test class
May fix:

https://github.com/BentoBoxWorld/BentoBox/issues/1023
2019-11-05 21:45:26 -08:00