Release 3.16.2#2982
Merged
Merged
Conversation
When a player accepts a team invite while standing in a non-BentoBox world, IslandTeamInviteAcceptCommand previously ran cleanPlayer / cleanJoiningPlayer synchronously before homeTeleportAsync. That clears inventory, ender chest, XP, etc. while the player is still in the previous world. Plugins that save per-world inventories on PlayerChangedWorldEvent (e.g. InvSwitcher) then see and persist the post-clear empty inventory as the previous world's stored state, permanently overwriting the player's real items in that world. Move the cleanPlayer / cleanJoiningPlayer calls into the homeTeleportAsync().thenRun() block so the resets fire after the teleport, in the island world. The disallow-team-member-islands branch still removes the player from their old islands before teleport (this is logical island state, not player data) and now deletes those islands inside thenRun alongside cleanPlayer for consistency. Adds a regression test that completes the teleport future manually and verifies inventory.clear() and the XP resets do not fire until the teleport future completes. Reported via InvSwitcher: inventory in non-BentoBox worlds is emptied after accepting an AOneBlock / Boxed team invite (game modes whose shipped or user-edited config sets on-join.inventory: true). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Compatible with the latest version of CraftEngine
…entory-after-teleport Defer on-join player resets until after team-accept teleport
Island.setRange previously accepted any int value, which let third-party addons silently overwrite an island's range with a value inconsistent with the gamemode's configured distance-between-islands. The next time IslandsManager.load() ran it would refuse to load the island and BentoBox would panic-disable with "Island distance mismatch". This was triggered in the wild by an inverted boolean in StrangerRealms' TeamListener (fixed separately in StrangerRealms#11) which fired resize() on islands belonging to other game modes during /<gamemode> team kick / team leave commands, calling setRange with StrangerRealms' own distance (typically 64) on AOneBlock / BSkyBlock / Boxed islands. setRange now refuses to change range to a value that disagrees with IWM.getIslandDistance(world) when the gamemode enforces equal ranges (the default — isEnforceEqualRanges() returns true). Game modes that legitimately resize claims (StrangerRealms etc.) opt out by returning false from isEnforceEqualRanges() and are unaffected. When the world is not registered (configured distance == 0) we have no authoritative value to validate against and pass through, preserving existing unit-test and deserialization paths. Refusal logs a WARN with the calling stack frame so addon authors can locate and fix the offending code path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…stance-mismatch Harden Island.setRange against distance-mismatch corruption
JitPack's v1.21-SNAPSHOT pointer for MockBukkit is unreliable: its maven-metadata.xml currently advertises version v1.21-v4.110.0-g1a072c3-1 but the corresponding .pom 404s, so Gradle aborts dependency resolution mid-build. Newer MockBukkit tags (>= v4.111) cannot be auto-built on JitPack either, because the project moved to a Java 25 toolchain that JitPack's default image lacks. v4.110.0 is the most recent tag with both .pom and .jar available on JitPack, and is the version the SNAPSHOT pointer was already trying to resolve to. Also update IslandTest.testSetRange — it was previously asserting that setRange(200) succeeded when the configured distance was 100, which is exactly the corruption pattern Island.setRange now refuses. Switch the test to simulate an addon that opts out via isEnforceEqualRanges()==false (the legitimate use case, e.g. StrangerRealms claim resizing), which is what setRange is actually for after the hardening. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pin MockBukkit to v4.110.0 (fix flaky SNAPSHOT resolution)
3.16.1 has already been released; the patches accumulated on develop since then (CraftEngine 26.5 compatibility, on-join reset ordering fix, Island.setRange hardening, MockBukkit pin) will ship as 3.16.2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.