Skip to content

Release 3.16.2#2982

Merged
tastybento merged 9 commits into
masterfrom
develop
May 19, 2026
Merged

Release 3.16.2#2982
tastybento merged 9 commits into
masterfrom
develop

Conversation

@tastybento
Copy link
Copy Markdown
Member

No description provided.

jhqwqmc and others added 9 commits May 18, 2026 00:02
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>
@tastybento tastybento changed the title Release 3.16.1 Release 3.16.2 May 19, 2026
@sonarqubecloud
Copy link
Copy Markdown

@tastybento tastybento merged commit f710898 into master May 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants