Commit Graph

2406 Commits

Author SHA1 Message Date
tastybento
a03aa51fb4 Fix NPE with admin teleport command. 2021-03-06 08:14:31 -08:00
tastybento
5fc06de146 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2021-03-03 21:33:33 -08:00
tastybento
3a8c1e7df0 Add support for villager stats to blueprints.
https://github.com/BentoBoxWorld/BentoBox/issues/1695
2021-03-03 21:33:23 -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
6309c675d4 Added a way to skip block checking for game modes.
https://github.com/BentoBoxWorld/BentoBox/issues/1694
2021-02-28 15:22:57 -08:00
tastybento
f4ff1bb412 Filter out null islands in worlds where players have none in world. 2021-02-28 11:55:43 -08:00
tastybento
9bb45ae426 Fix bug with IslandsManager maxMembers NPE when logging in. 2021-02-27 19:18:45 -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
938297ab14 Adds command-line settings for admins.
https://github.com/BentoBoxWorld/BentoBox/issues/1658
2021-02-27 11:14:04 -08:00
tastybento
cc47fcb823 Show better error if addon cannot be loaded. 2021-02-21 09:28:02 -08:00
tastybento
ed85dce1b2 Fire TeamLeave and TeamKick events earlier so they can be canceled. 2021-02-20 11:13:55 -08:00
tastybento
c9a7804921 Handle new Spigot version naming convention
Spigot added the build number to the version number.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1648
2021-02-19 15:03:05 -08:00
tastybento
06caf1c147 Ignore islands in worlds that are not loaded. 2021-02-19 13:13:09 -08:00
tastybento
db3b339be2 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2021-02-17 18:37:10 -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
Huynh Tien
2bc5e59e9a
Fix loop in nether portals (#1686)
* Fix loop in nether portals

Close #1685

* Forgot to import
2021-02-17 11:53:22 -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
BONNe
79c3804603
Implements ability to use faster player head gatherer (relates to #1646). (#1679)
Adds 3 new BentoBox options:
- use-cache-server: option which allows to use mc-heads.net API for gathering player heads. It is a bit faster than Mojang API.
- heads-per-call: option which allows to specify how many heads will be requested at once per each API call.
- ticks-between-calls: option which allows to specify how many ticks should be waited until next API call.

All these options will allow much more faster player head gatherer.

Changes includes optimization for Mojang API too. For servers in online mode, HeadGetter will use Player UUID, instead of asking for UUID from API.
2021-02-16 15:57:04 -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
69b40ee141 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2021-02-15 15:50:45 -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
BONNe
f66200034d
Fixes crash loading addon with SNAPSHOT api-version (#1684) 2021-02-15 09:18:08 -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
ce79588805 Fixed admin switch command when inside another island. 2021-02-07 10:05:29 -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
apachezy
e134951e61
Fix a minor problem in language translation (#1674)
Co-authored-by: apacheZy <apachezy@hotmail.com>
2021-02-05 18:57:06 -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
Alberto
455e662d22
Fix player not being expelled from visitors if in team (#1670)
* Fix player not being expelled from visitors if in team

* Error on arguments
2021-02-02 17:16:42 -08:00
tastybento
bb7ed2b85c Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2021-01-30 10:35:37 -08:00
tastybento
0372d6766f Fixed bug where End not being deleted. 2021-01-30 10:35:26 -08:00
Florian CUNY
82f3375459 Updated bStats to 2.1.0
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1664
2021-01-30 15:39:21 +01:00
tastybento
2bef0fe57c Added convenience methods getPlayersManager() and getIslandsManager()
This just helps make the API more friendly and consistent with other
manager getters.
2021-01-24 14:14:31 -08:00
tastybento
01d8075318 Remove null check for user in BasicPlaceholderExpansion
https://github.com/BentoBoxWorld/BentoBox/issues/1654
2021-01-21 15:30:08 -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
Thomas Cordua-von Specht
737ad16ff6
Fix NPE in getSafeHomeLocation (#1650) (#1651) 2021-01-20 15:48:22 -08:00
Florian CUNY
c62221efb8 Added 1.16.5 compatibility, set < 1.16.4 versions as not supported and <= 1.15.2 as incompatible
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1648
2021-01-17 14:31:04 +01:00
Florian CUNY
ab9577b93e Updated /bbox about : we're in 2021 now! 2021-01-16 23:23:29 +01:00
Florian CUNY
b8d67a653c Fixed some code smells (Sonarcloud)
Put some fields as "final"
Made all abstract classes' constructors "protected" (them being public serves no purpose since they cannot be instantiated outside of child classes)
Did some minor code prettifying
2021-01-16 11:27:12 +01:00
tastybento
605df692f0 Fix Yaml test 2021-01-08 21:24:54 -08:00
tastybento
7e52a5f641 Added an isChanged() method to Island
The island will only be saved if isChanged() is true. It is set to true
if any setter is used or a field is changed.

This should help servers shutdown a lot faster and background database
saves go quicker. Only applies to Islands!

https://github.com/BentoBoxWorld/BentoBox/issues/1629
2021-01-08 20:55:43 -08:00
tastybento
2701eb92d7 Do not use orElse as it ignores the reservation.
https://github.com/BentoBoxWorld/BentoBox/issues/1636
2021-01-08 20:06:21 -08: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
78b10cb7bf Do not remove entities that have getRemoveWhenFarAway() false.
If an entity has this set to false, then the area clear will not affect
it. @BONNe FYI
2021-01-04 22:50:16 -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