Commit Graph

687 Commits

Author SHA1 Message Date
tastybento
9220f9652b Fix broken tests. 2021-03-27 17:20:43 -07:00
tastybento
c6e2a9bd66 Admin teleport now goes to island spawn locations if they exist 2021-03-27 09:23:24 -07:00
tastybento
ed46695546 Added teleport method test to DelayedTeleportCommandTest. 2021-03-21 15:58:10 -07:00
tastybento
9e0fdbd210 Add Util method to enable multi-lingual broadcasts. 2021-03-21 09:04:30 -07:00
tastybento
8f767d5e44 Fix tests - event is canceled now.
Change done here: 592b4e3d1f
2021-03-18 18:45:05 -07:00
tastybento
87bdee0946 Return island protection center instead of island logical center
IslandsManager.getIslandLocation(world, uuid) is used to find the
starting point for the island home if a safe home for players cannot be
found. It returns the island center location but should return the
center of the island protection because that can now be in a different
location.
2021-03-17 15:18:55 -07:00
tastybento
6c775329d0 Fix InvincibleVisitorsListenerTest. 2021-03-14 13:48:31 -07:00
tastybento
d97d15d47a Added locale strings for the DamageCause enum. Used in InvincibleVistors
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1705
2021-03-14 10:18:33 -07:00
tastybento
6849c2a8bd Delete backup database during tests. 2021-03-07 11:34:30 -08:00
tastybento
e4a8d705f1 Fix IslandTeamCoopCommand test. 2021-03-06 14:12:46 -08:00
tastybento
b6a69d0c90
Switch to island homes from player homes. (#1689)
* Switch to island homes from player homes.

Stores home locations and max homes in the Island object. Adds commands
required to manage home names, specifically rename and delete. I did not
add list as there is tab complete on island go, but it may be required.
2021-03-01 10:42:08 -08:00
tastybento
a8473c27a9 Added test for isCheckForBlocks 2021-02-28 15:25:30 -08:00
tastybento
bae0e6c36f Fix tests. 2021-02-28 15:24:29 -08:00
tastybento
93417d6a6c Test cleanup 2021-02-28 08:10:18 -08:00
tastybento
010a56bc7b Fixed broken tests in IslandsManager 2021-02-28 07:54:13 -08:00
tastybento
dfd4df4e05
Adds maxMembers to the Island object for persistent storage (#1691)
* Adds maxMembers to the Island object for persistent storage

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

* Expanded approach to include coop and trusted ranks.

* Checks for max members/coops/trusts on accept based on island setting.

* Write island max member/coop/trusted if owner joins server

This updates the island's settings based on the owner's permissions.
2021-02-27 11:19:02 -08:00
tastybento
04be4cf7de Fixed long standing bug in unused Util method getClosestIsland
Changed AdminRegisterCommand to use the method to remove code
duplication.
2021-02-17 18:36:57 -08:00
tastybento
969b413588 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2021-02-16 17:15:19 -08:00
tastybento
97ac70cea3 Handle null users when getting island. Added test case.
A recent change to placeholders meant that it is possible for users to
be null. See https://github.com/BentoBoxWorld/BentoBox/issues/1654
2021-02-16 17:15:07 -08:00
tastybento
6316ca2411
Enables panels to know the context of the world that initiated them. (#1682)
Panel API did not have this context so commands had to force players to
be in the world that the command used. These changes add the world
context to the PanelBuilder and changes the settings panels to use it.
Players and admins can now run settings commands in any world.

https://github.com/BentoBoxWorld/BentoBox/issues/1673
2021-02-16 15:56:34 -08:00
tastybento
14592ec518 Improves obsidian scooping in presence of water.
https://github.com/BentoBoxWorld/BentoBox/issues/1683
2021-02-15 15:50:32 -08:00
tastybento
fb4ad90328 Obsidian scooping was weird with just one bucket.
It's not clear why this was flakey. It might be that the event was being
canceled.

https://github.com/BentoBoxWorld/BentoBox/issues/1683
2021-02-14 22:25:08 -08:00
tastybento
b27d0bbca4 Use BlockInteractionListener to protect Hives and Bee Nests 2021-02-14 16:56:38 -08:00
tastybento
770d8b0bef Harvest listener 2021-02-14 12:52:51 -08:00
tastybento
582aa9fa9e Adds world flag to prevent pets from teleporting off home island
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1442
2021-02-14 11:05:40 -08:00
tastybento
1d9ce7241e
Decouple island location from island center. (#1659)
* Decouple island location from island center.

This enables the protection area to move anywhere within the island
boundaries

* Paste island at island location.

* Move visitors to the island location

* Added island location placeholders

* Use island location instead of island center

* Fix tests

* Allow radius 1 islands.

* Correct admin range set limit

* Debug in progress

* Fix island deletion.

The speed option was doing nothing except causing repeated actions on
the same chunks.

* Soft depend for WorldGeneratorApi for Boxed game mode

* Changed to "protectionCenter".

Added logic to expand the deletion area based on moving the island
protection location and range instead of just deleting everything. This
will keep deletion time to a minimum for BSkyBlock, etc.

* Fix tests.
2021-02-13 10:19:53 -08:00
tastybento
045b11ae1a Fix TestBentoBox test. 2021-02-06 15:10:45 -08:00
tastybento
e7672b17c4 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2021-02-06 12:08:20 -08:00
tastybento
1da3539f02 Changed AdminSwitchCommand to use player meta data
Fixed tests. Abstracted common test code to AbstractCommonSetup class.
2021-02-06 12:08:09 -08:00
tastybento
4e7b78832a
Nether portals (#1597)
* Add WorldSettings methods for portals

* Vanilla portals option added.

Currently defaulted on for testing. Ultimately, the game mode config can
decide if the vanilla portal is used or not.
Note that the end platform is just a set of obsidian blocks.

* Reduces search radius when close to island edge

* Adds and fixes tests

* Use EntityPortalEnterEvent instead of PlayerMoveEvent

* Removed duplication between nether and end portalling

* Code clean up

* Single event handler for nether and end.

* Created new PlayerEntityPortalEvent class to enable entity teleports

Unfortunately, PlayerPortalEvent and EntityPortalEvent are not fraternal
classes so there's no way to apply code to both except via this
abstraction class.

Tests fail.

* Places end portal always in the same place.

* Teleport entites to nether or end

Identify the teleport cause manually because there is no method.
Teleports to the End happen but seem to be slightly different locations.
Some entities will disappear, others will stick around. I don't know
why.

* Put defaults back to false.

* Create end spawn point to default point when not making end islands

* Fixed PortalTeleportationListener tests.

* Updated since tag
2021-02-02 17:19:22 -08:00
tastybento
1eee225def Added test case for getSafeHomeLocationNoIsland() for player with no
island.

https://github.com/BentoBoxWorld/BentoBox/pull/1651
2021-01-20 16:01:06 -08:00
tastybento
942c1ff3b3 Test clean up.
Due to changes in the PAPI API code, the current tests don't run and are
ignored.
2021-01-17 11:31:40 -08:00
tastybento
42aefc530e Change to assertNotEquals 2021-01-16 11:53:07 -08:00
Florian CUNY
4ce87cd858 Fixed the same test, once again... 2021-01-16 15:37:35 +01:00
Florian CUNY
6105a2fe64 Fixed a test 2021-01-16 15:22:40 +01:00
Florian CUNY
f7e901def9 Ignored failing PlaceholderAPIHook tests for now
There's an issue with the mocking on PAPI's latest version
2021-01-16 14:52:05 +01:00
Florian CUNY
c60833a054 Fixed code smells in tests (SonarCloud) 2021-01-16 14:27:01 +01:00
tastybento
2c7f54fe10 Use orElseGet instead of orElse
orElse is a trap because it evaluates even if the Optional is empty.
orElseGet is the correct way.
2021-01-08 20:05:23 -08:00
tastybento
86af7b568c Fix test for clearArea 2021-01-04 22:53:11 -08:00
tastybento
4f0ef8feb0
Better island meta data api (#1630)
* Improves the meta data API for Island

* Unified API into MetaDataAble Interface

All classes now use the same interface and Optionals. Reduces code
duplication and makes the API the same across the board.

* Version 1.15.6

Fixed since JavaDocs
2021-01-03 11:31:34 -08:00
tastybento
d7c7559546 Adds a persistent metadata API to User and Island classes.
This is modeled after the Bukkit metadata API with the difference that
it is persistent, i.e., metadata is stored to the database. Metadata can
be placed on Islands or Users.

This API should be useful for addons that do not want or need to create
their own database tables and instead just want to tag the user with
some data, or tag the island with some data. It is intended for small
amounts of data, like boolean tags or other values.
2020-12-28 20:39:08 -08:00
tastybento
e84b1f1830 Fix tests that failed due to timezone 2020-12-28 16:35:44 -08:00
tastybento
72de0301e6 Added visited island UUID placeholder
Added test class for game mode placeholders.

Removed duplicated code for visited island placeholders.
2020-12-28 12:18:17 -08:00
tastybento
999d196e8e
Event fix with deprecation (#1623)
* Break out events and add individual handlers

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

* Corrected AddonEvents to have proper static handlers

* Made constructors protected.

Abstract classes should not have public constructors. Constructors of
abstract classes can only be called in constructors of their subclasses.
So there is no point in making them public. The protected modifier
should be enough.
2020-12-27 10:35:49 -08:00
tastybento
d774124d89 Fixed/removed tests
These are no longer relevant as this function is now in the
PlayersManager and tested there.
2020-12-24 21:56:02 -08:00
tastybento
c7d7871f94 Player clean up
Moved per removal to PlayersManager

Added cleanup to IslandResetCommand

Added test class for clean up method.
2020-12-24 15:30:52 -08:00
tastybento
e608a95442 Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1602 2020-12-14 19:08:04 -08:00
tastybento
2cb1e7c306 Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1579 2020-11-26 18:05:26 -08:00
tastybento
caed56f16e Load initial tp location async
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1584
2020-11-26 17:25:17 -08:00
tastybento
5321e1dda6 Prevent exposing vanished players with expel
https://github.com/BentoBoxWorld/BentoBox/issues/1573
2020-11-14 11:59:38 -08:00
tastybento
79f6600fd2 Fixed tests and other small code smells 2020-11-08 16:48:08 -08:00
tastybento
1d4fd435a9 Added World TNT Damage Flag
Enables admins to decide whether TNT should damage outside of island
boundaries

https://github.com/BentoBoxWorld/BentoBox/issues/1562
2020-11-08 10:43:15 -08:00
tastybento
ba903bdaca
Stops async db saving on shutdown. Adds JSON backup. (#1558)
* Stops async db saving on shutdown. Adds JSON backup.

* Fixes test failures and added Util class tests.
2020-11-01 13:58:29 -08:00
tastybento
4a24364f81 Collect water wasn't overriding bucket usage for visitors
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1545
2020-10-12 15:45:38 -07:00
tastybento
f09ea1ffef Adds PreCreateEvent for API 2020-10-12 14:07:47 -07:00
tastybento
fad1fc84da
Enables nether and end teleporting even if they are disabled by server (#1539)
* Enables nether and end teleporting even if they are disabled by server

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

* Fix PortalTeleportationListener tests

* Revert Travis.yml
2020-10-11 07:38:21 -07:00
tastybento
fb53ac17e1
Inserts gamemode name into placeholders before passing to PaceholderAPI (#1514)
https://github.com/BentoBoxWorld/BentoBox/issues/1512

Co-authored-by: Florian CUNY <poslovitch@bentobox.world>
2020-10-08 17:47:54 -07:00
tastybento
4609881542 Citizen NPCs are not island visitors so do not protect them.
https://github.com/BentoBoxWorld/BentoBox/issues/1518
2020-09-18 13:45:39 -07:00
tastybento
5a5435d815 Let Citizens handle its own PVP protection.
https://github.com/BentoBoxWorld/BentoBox/issues/1518
2020-09-17 08:09:39 -07:00
tastybento
c8a85a9ba2 Added Settings class junit tests 2020-09-13 09:52:05 -07:00
tastybento
bc0e8a9df4 Added GeoMobLimitTab test class 2020-09-12 16:44:00 -07:00
tastybento
b3ffa1511b Updated LockAndBanListener tests. 2020-09-12 16:01:23 -07:00
tastybento
40ecbc8ec6 Update API for event constructor - anchor spawn 2020-09-12 15:53:52 -07:00
tastybento
42622d6e38 Fixes test by using non-deprecated event constructor.
API 1.16.2 removed a deprecated EntityShootBowEvent event constructor.
2020-09-07 13:29:33 -07:00
tastybento
450c459350 Doors are not safe ground blocks.
https://github.com/BentoBoxWorld/BentoBox/issues/1517
2020-09-06 16:16:06 -07:00
tastybento
e9370b9a05 Prevent expel tab-complete from detecting invisible players.
https://github.com/BentoBoxWorld/BentoBox/issues/972
2020-09-02 21:50:25 -07:00
tastybento
9ff62dad2a Added TextVariables.GAMEMODE constant 2020-09-01 16:58:13 -07:00
tastybento
ea4ef1e21a Adjusts tabComplete for a number of commands.
Enforces the need to type at least one letter for whole-server tab
completes.
2020-08-31 22:03:51 -07:00
tastybento
c1ede3c66a Prevent invites to vanished players
https://github.com/BentoBoxWorld/BentoBox/issues/972
2020-08-31 20:59:11 -07:00
tastybento
845d27de68 Adds or enhances tab complete for kick/uncoop/untrust
https://github.com/BentoBoxWorld/BentoBox/issues/1509
2020-08-30 13:41:04 -07:00
tastybento
1e4056e33a Clears player cache by name and UUID
Previously only UUID was checked, but joining with a name and different
UUID is possible. This clears out the cache so commands that look up
names like ban do not use the old UUID.

https://github.com/BentoBoxWorld/BentoBox/issues/1468
2020-07-25 14:37:45 -07:00
tastybento
284b5865da Prevents instant lava placing when scooping.
https://github.com/BentoBoxWorld/BentoBox/issues/1459
2020-07-22 22:29:37 -07:00
tastybento
bdbfd33a34
Fixed code smells (#1444)
* Code smell changes

* Fixes issues raised in reviews.
2020-07-09 09:03:01 +02:00
Florian CUNY
5e0e19a1be Breaking boats/minecarts is now handled by their respective flags
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1430
Improved description for MINECART and BOAT flags
2020-07-04 13:11:09 +02:00
tastybento
2b5deb4133 Added unregisterFlag method to FlagManager
This was requested on Discord. Enables plugs or addons to tidy up flags
if they are disabled for some reason.
2020-07-02 16:05:42 -07:00
tastybento
89849442a9 Protected hoglin and strider breeding
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1419
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1418
2020-06-28 15:05:48 -07:00
tastybento
23fecdea54 Improves HeadGetter and Panel
Will replace more than one head in a panel if found.
2020-06-28 09:15:42 -07:00
tastybento
b87533fffb
Introducing (limited) 1.16.1 support (#1416)
* 1.16.1 changes

* Fixed failing tests in PhysicalInteractionListener
HOWEVER, the code somehow no longer protects the pressure plates... I'm investigating that.

* Implemented future-proof buttons, doors, fence gates, trapdoors protection

* Protected REDSTONE_WIREs under "REDSTONE" flag
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1421

* Fixed bug with pressure plates

* Fixed params order in assertEquals in PhysicalInteractionListenerTest

* Fixed EnderChestListenerTest errors

* Fixed most errors in BlockInteractionListenerTest

* Added 1.16.1 to ServerCompatibility

* Fixed BlockInteractionListenerTest

* Fixed backwards compatibility in BlockInteractionListener
Also made use of existing Tags (ANVIL, BEDS, SHULKER_BOXES)

* Fixed BlockInteractionListenerTest (again)

* Fixed backwards compatibility in PhysicalInteractionListener

Co-authored-by: Florian CUNY <poslovitch@bentobox.world>
2020-06-26 22:09:33 +02:00
tastybento
9f5fb590e0 Fixes test broken by old flag name being used
cbbd361b03
2020-06-21 13:41:42 -07:00
Florian CUNY
cbbd361b03 Split the animal/monster spawn flags to "natural" and "spawners"
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1351
2020-06-21 17:47:01 +02:00
tastybento
7ee706c982 Fixes elytra protection. Adds test class.
https://github.com/BentoBoxWorld/BentoBox/issues/1403
2020-06-16 19:12:07 -07:00
tastybento
09072282bb
Replaces command running with single Util method (#1374)
Adds respawn commands.
2020-06-13 18:51:05 -07:00
tastybento
0fec5aec51 Added insufficient rank error and fixed tests.
The no permission error was being added, but thats wrong because it's
not lack of permission but lack of rank that is the issue. This adds a
new error and shows it in the various commands.
2020-06-06 17:01:09 -07:00
tastybento
38db699801
Uses async location loading for home teleporting (#1381)
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1241

Co-authored-by: Florian CUNY <poslovitch@bentobox.world>
2020-06-02 10:22:35 +02:00
tastybento
d6b2a88b32 Fixes rank checking for team invites
Only owners could invite players successfully. This now checks based on
rank.
Added a method to allow rank checking on UUID. Had to make tests be
specific to the User.class.

https://github.com/BentoBoxWorld/BentoBox/issues/1377
2020-05-30 11:22:05 -07:00
tastybento
fdb4df3d93 Show correct missing permission for multi sethome command
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1367
2020-05-25 16:44:22 -07:00
tastybento
2e0ca14729
Uses perform command instead of direct call. (#1359)
* Uses perform command instead of direct call.

Goal is to enable 3rd party alias plugins to catch the command.

* Fires PlayerCommandPreprocessEvent before performCommand

Adds a / to the front of the default player commands.

Fixes issue with MyCommand plugin.

* Fixes tests
2020-05-23 19:53:55 -07:00
tastybento
feab01cde8
Add ability for DataObjects to specify custom db table name (#1348)
Automated migration for existing databases is supported.
2020-05-13 10:49:42 +02:00
Florian CUNY
937052d378 Fixed addon api-version compatibility check
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1346
Added a unit test to prevent regressions

Newer BentoBox releases are now properly considered "compatible" to addons expecting an older patch release
2020-05-09 11:26:00 +02:00
tastybento
9a517446c8 Panel should ignore color codes when checking player name for heads
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1343
2020-05-07 16:19:09 -07:00
tastybento
61fe218a16 Purge was not calculated player logins correctly.
https://github.com/BentoBoxWorld/BentoBox/issues/1333
2020-05-02 16:14:03 -07:00
Florian CUNY
314fddc400 Fixed tests 2020-04-29 18:51:07 +02:00
tastybento
f9906fa2f5 Fixed broken build. Fixed failed tests. 2020-04-27 18:58:14 -07:00
tastybento
e381d61c3c Fixes issue where addon has no perms in addon.yml
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1312
2020-04-26 10:08:45 -07:00
tastybento
17186dd791 Remove unused imports 2020-04-26 08:32:52 -07:00
Florian CUNY
a5c710ce3a Fixed tests 2020-04-26 13:17:22 +02:00
tastybento
1f3a79127a
Implements placeholder permissions for addons (#1305)
Implements #1303. 

Addons will no longer need to see their permissions updated each time there is a new gamemode. They can use [gamemode] in their permissions to automatically register the permissions on all available gamemodes.
2020-04-26 01:20:48 +02:00
tastybento
fe58159db3
Adds saveObjectAsync with a CompletableFuture return for databases (#1308)
Deprecates the saveObject() method
2020-04-26 01:00:49 +02:00
Florian CUNY
46ba40b70d Fixed IslandsManager#getSafeHomeLocation throwing NPE if world is not an island world
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1306
The method now properly returns null if the world is not an island world.
2020-04-25 14:40:47 +02:00
tastybento
ae63125f50
Enables UUIDs to be used in admin commands as well as names (#1298)
Implements a solution for #1297.

Adds Util#getUUID(String nameOrUUID)
2020-04-23 21:16:09 +02:00
tastybento
b1dcec2160
Adds API to enable commands to be hidden from help and tab (#1301)
Implements #1300.

Adds CompositeCommand#setHidden(boolean).
2020-04-23 20:54:45 +02:00
tastybento
eee8709636 Combined safe spot checking into one place.
We had two sets of checking with different criteria. This consolidates
them.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1296
2020-04-22 18:25:10 -07:00
tastybento
88b331d1e4 MySQL databases were not saving properly on shutdown.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1292
2020-04-20 18:37:42 -07:00
tastybento
85d5a3a6ac
Adds a single character prefix to database tables (#1278)
* Adds a single character prefix to database tables

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

* Fix tests

* Fix bug with substring
2020-04-18 14:16:36 -07:00
tastybento
f5f2d7ac39 Fixes IslandTeamKickCommand test (commands.island.team.kick.cannot-kick) 2020-04-17 07:14:13 -07:00
tastybento
d327ea4a89 Protect paintings from projectiles and being placed.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1273
2020-04-09 16:02:51 -07:00
tastybento
b6b9b11f53 Removed unused imports 2020-04-07 13:42:42 -07:00
Florian CUNY
5b01f39f9e Fixed tests and logic with coop/trust limits 2020-04-05 15:15:26 +02:00
Florian CUNY
e7b1f51a83 Fixed tests 2020-04-05 00:38:30 +02:00
Florian CUNY
962b7d734a Removed MVdWPlaceholderAPIHook and all related methods
It was increasingly causing issues, ranging from long start times, unreliability with some of our placeholders, to much more...
There's a way for MVdWPAPI users to get PAPI's placeholders, so they should definitely use that instead.
2020-04-04 15:38:29 +02:00
Florian CUNY
2c7316ba21 Added AdminPurgeStatusCommand and improved some purge-related messages
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1254
2020-04-04 15:31:22 +02:00
tastybento
02b16c233c Fixes tests. 2020-04-02 14:49:45 -07:00
tastybento
c724b6bbf2 Remove unused import 2020-04-02 13:21:26 -07:00
Florian CUNY
9e620cbbac Fixed spawn islands that could be purged as unowned
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1255
Also added a few more tests to prevent regression
2020-03-31 14:30:27 +02:00
tastybento
25d43c4f9f Removes velocity on teleporting
https://github.com/BentoBoxWorld/BentoBox/issues/1248
2020-03-28 09:42:55 -07:00
tastybento
8e77dc95df Fix perm tests in JoinLeaveListener. 2020-03-18 16:35:20 -07:00
tastybento
1933d498f6 Fixes handling of negative perms for value setting
https://github.com/BentoBoxWorld/Limits/issues/73#issuecomment-600748928
2020-03-18 14:18:38 -07:00
tastybento
71c923975b Fixes tests for PVPListener class.
Were broken by PR https://github.com/BentoBoxWorld/BentoBox/pull/1230
2020-03-18 08:50:10 -07:00
tastybento
0a86ddd0ab Fixes island creation on joining.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1221

The original code could actually never work because the check for
whether a player had played before or not was occuring immediately after
addPlayer, which added the player to the server. Also, the code to run
was running in a thread and not on the main thread, so if it had run
could have caused errors.
2020-03-10 18:30:50 -07:00
tastybento
34ce9d3fc2 Speed up new island spot search.
Relates to https://github.com/BentoBoxWorld/CaveBlock/issues/44
Added a test case to benchmark search algorithms.
2020-03-06 18:04:38 -08:00
tastybento
30d9ed3887 Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1216 2020-03-05 16:47:52 -08:00
tastybento
669986b422 Added IslandEventTest class and fixed bugs with IslandEvent
IslandReserveEvent was missing.
2020-03-04 19:02:50 -08:00
tastybento
b99be85bad Removed unused comments 2020-03-04 18:50:23 -08:00
tastybento
f7a3da1502 Fixes IslandResetCommandTest failure 2020-03-04 18:47:37 -08:00
tastybento
b4a1398fcb Limits island height to value values only.
Relates to https://github.com/BentoBoxWorld/SkyGrid/issues/39
2020-02-29 15:29:24 -08:00
tastybento
8393784498 Fixes projectile damage by block bug
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1211
2020-02-29 10:04:59 -08:00
tastybento
b189ebde65 Ignores colors when checking panel names
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1202

Black is a default color so there can be a mismatch between the
inventory title and the expected title if colors are used. In general,
it is safer not to check colors for GUIs.
2020-02-21 18:53:20 -08:00
tastybento
65dbd530d5 Added IslandPreclearEvent
This event gets called prior to an island being cleared of players and
other data. This can happen before a reset or an admin delete. It is
there so addons can perform tasks on the players before the island is
cleared.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1200
2020-02-20 16:56:35 -08:00
tastybento
d3a7a908f1 Fixes tests for NewIsland class
Broken by https://github.com/BentoBoxWorld/BentoBox/pull/1179
2020-02-19 19:46:49 -08:00
Florian CUNY
f383c196a5 Updated FLINT_AND_STEEL flag description to also tell about campfires 2020-02-12 13:39:01 +01:00
Florian CUNY
120be13b36 Fixed and improved Breeding protection
It wasn't catching breeding with some newer animals (Pandas, Foxes...), was a bit overprotective (it could prevent feeding some animals), or wasn't catching some breeding items (Golden Carrots, ...).
I rewrote it so that every animal is now protected with the foods that actually make them breed (based off the MC wiki page about Breeding).
Once we will move to 1.15 API, we will have to add BEES in that.
2020-02-12 11:36:08 +01:00
tastybento
05a4b2d2c7 Adds new perm for bypassing delayed commands.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1136
2020-02-07 18:42:39 -08:00
tastybento
332967950f Fixes the API checking algorithm.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1176
2020-02-07 18:25:40 -08:00
tastybento
898e310e4f Handle null itemInHand for BlockPlaceEvent
Officially, null is invalid as an in-hand item. It should be AIR.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1172
2020-02-07 11:52:01 -08:00
tastybento
ab89e4835e Fixes island center startx/z correction.
https://github.com/BentoBoxWorld/BentoBox/issues/1169
2020-02-04 12:20:31 -08:00
Florian CUNY
2e3b9962c8 Fixed "PVP disabled in ..." messages not using world-specific messages.
No matter which dimension the player was in, in some cases, it was telling "PVP disabled in the Overworld".
2020-02-02 11:07:27 +01:00
tastybento
07706d78e1 Enables tp commands to work from console.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1158
2020-01-30 10:12:31 -08:00
Florian CUNY
093373550d Fixed tests (again) for IslandTeamInviteAcceptCommand 2020-01-25 08:45:06 +01:00
Florian CUNY
1bcb12a51f Fixed tests for IslandTeamInviteAcceptCommand 2020-01-24 21:56:18 +01:00
tastybento
97f7b2c563 Deleted islands could not be used as new islands
Added test class for DefaultNewIslandLocationStrategy to cover the
cases.

https://github.com/BentoBoxWorld/BentoBox/issues/1147
2020-01-21 13:15:55 -08:00
tastybento
013e17d73a Removed unused import. 2020-01-18 08:43:47 -08:00
Florian CUNY
0559a86e8d Implemented optional argument to AdminGetrankCommand to specify which island to perform the check on.
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1106
Updated en-US + added 'general.errors.player-is-not-owner' message.
2020-01-18 10:47:08 +01:00
Florian CUNY
abf5e1f071 Fixed failing test in JoinLeaveListener (erroneous) 2020-01-18 09:58:16 +01:00
Florian CUNY
e17056376a Fixed erroring tests 2020-01-18 09:52:02 +01:00
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