* Improve ItemParser code.
Add ability to parse text if Material is just a single string.
Add ability to parse player heads.
Add comments to the code.
* Fixes failing test.
* Version 1.17.3
* Use Map.of and List.of instead of Immutable collections
* Replace explicit type argument.
* Replace lamba with method reference
* Replace condition with Objects.requireNonNullElseGet
* Use String.repeat
* Use new switch expressions
* Use instanceof patten variables which are more compact
* Fuse toUnmodifiableList into stream and return it.
* Remove unnecessary toString() calls.
* Remove unnecessary public
* Extracted common part from if
* Simplify conditional expressions
* Remove unused IOExceptions
* Cast to long
* Use Map.putAll
* Use primitives
* Clarify what is null or not
* Addedd @Serial annotation introduced with Java 14.
* Use Optional.isEmpty instead of !isPresent
* Use flatMap then ifPresent
* Just use Arrays.stream
* Swap map and filter for null with Objects::nonNull
* Use expression lambda
* Version 1.17.2
* Add alternative Addon#getIslandManager method (#1797)
We have already done this to the main BentoBox class. But add-ons missed it, and it still has this weird structure: Addon#getIslands().getIslands().
This will just add the same method as it is already in BentoBox class.
* Fix bucket dupe (#1806)
Fix https://discord.com/channels/272499714048524288/310623455462686720/867790395442462760
* Removes unneeded exploit protection code for skulls (#1810)
This no longer seems to be required with 1.17.1
https://github.com/BentoBoxWorld/BSkyBlock/issues/430
* Quote filename of addon that cannot be loaded.
Provides a better understanding of which addon failed.
* Remove update when pasting chest.
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>
We have already done this to the main BentoBox class. But add-ons missed it, and it still has this weird structure: Addon#getIslands().getIslands().
This will just add the same method as it is already in BentoBox class.
* Version 1.17.1
* Add homes command to default player options.
* Implements better online player counter. (#1791)
Current one is based on online player count when bStats sends data to the server.
This one will send data about amount of players who logged in the server.
* Add Boxed Gamemode to the list. (#1793)
* Add Bank addon (#1792)
* Add Holographic Displays as SoftDepend for AOneBlock (#1794)
* Custom date time format support for /<admin> info <player> (#1783)
Fixes#1720
* Parent/sub-flag support, split up and designate CONTAINER flag as parent flag (#1784)
* Split CONTAINER flag into multiple flags
CONTAINER split into
- CONTAINER (Chest/Minecart Chest)
- BARREL (Barrel)
- COMPOSTER (Composter)
- FLOWER_POT (Flower Pot)
- SHULKER_BOX (Shulker Box)
- TRAPPED_CHEST (Trapped Chest)
Fixes#1777
* Add subflag support
* Create container parent flag, chest subflag
* Remove extra string from when CHEST was CONTAINER
* Fix incorrect flag specified on fired event in IslandToggleClick
* Add missing world subflag event firing
* Remove extra import
* Add world setting flag for island visitors keep inventory (#1785)
* Implement 3 bar charts: addons, gamemodes, hooks (#1790)
BStats supports sending Bar chart data, however, it does not display it via their site directly.
It can be called manually, to view.
PieChart does not work very well for addons and hooks. BarChart however allows viewing each addon separately.
This change allows sending data to the server about bar charts.
* Update action versions
* Declare distribution - adopt
* Cache Java Maven files differently.
* Try dependency for shade snapshot
* Add support for Minecraft 1.17.1
* Fix test by incrementing listener value check
There is a new listener now.
* Spigot 1.17.1
* Fix test for InventoryListener
* Re-order repos.
* Downgrading to 1.17 Spigot for now to enable building.
* Try pluginRespositories tag in POM to enable Github actions
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>
BStats supports sending Bar chart data, however, it does not display it via their site directly.
It can be called manually, to view.
PieChart does not work very well for addons and hooks. BarChart however allows viewing each addon separately.
This change allows sending data to the server about bar charts.
Current one is based on online player count when bStats sends data to the server.
This one will send data about amount of players who logged in the server.
* Java 16 preliminary branch.
This compiles, but junit tests fail all over because there is a lack of
Java 16 support right now.
* Use Java 16
* 1.17 WIP
* Require 1.17
* Fixes tests.
* WIP fixing tests
* Exclude maven from shading
* Try update snapshots to build action
* Try repo on command line
* Remove reference to shade plugin in dependencies
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.
The issue happens mostly with the end portals. Apparently, teleportation to the end is processed before the Bukkit task that runs SafeSpotTeleport. The first check if a player is in the starting world fails, and SafeSpotTeleport is not called.
I set the event to be cancelled in all situations when we do not create portals, so it always triggers SafeSpotTeleport. This should fix the bug with players appearing in the void.
If a player has end portal at Y=0 or Y=1, then they were spawned in the void, if makePortals option was enabled.
It happens because end portals are generated with 2 air layers above the obsidian platform. So minimal location is necessary to be at least 2 (2 for air and obsidian at 0).
* 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.
* 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.
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.
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
* 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.
* 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
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
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
* 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
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.
* 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.
* Try loading adjacent chunks, but too slow.
* NMS void delete
* Revert the extra chunk in IslandDeletion.
That was for another deletion approach.
* Added NMS abstraction.
* Debug
* Clearer code.
* Clarify exceptions
* Persistent entities should never be removed.
There is no valid reason why BentoBox should remove the Persistent entity. Otherwise, what is the point of being persistent if someone can just remove it?
* Changes which mobs can be removed outside island
Protect renamed and persistent entities from being removed if they wander outside island bounds.
Except for animals, as they cannot be removed only if they are renamed.
There was not specific reason why this was being done and in testing, I
cannot find a reason why it is needed (yet) so I am removing it due to
the lag reported in
https://github.com/BentoBoxWorld/BentoBox/issues/1580
* Add getKey and getValue for Pair calls for nicer access.
* Fixes ConcurrentModificationException in HeadGetter.
Fixes an issue when elements with the same name were overwritten by HeadGetter.