Skip to content

Team-member island switching; honor game mode option requests - #71

Merged
tastybento merged 4 commits into
developfrom
feature/team-member-island-switching
Nov 25, 2026
Merged

tastybento merged 4 commits into
developfrom
feature/team-member-island-switching

Conversation

@tastybento

@tastybento tastybento commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

The game mode requests only do something with BentoBoxWorld/BentoBox#3145, which adds the method game modes use to ask. This PR does not need it to build or run: the method is looked up by name, so the addon stays on its current BentoBox version and Java 21.

Team members

Island-specific inventories, advancements and the other per-island options were only switched for the owner of an island. A team member of two islands carried one set of data between them. Store.isOnTeam(island, uuid) replaces the owner checks.

Game mode requests

A game mode can ask for the options it needs through BentoBox's new getRequestedSettings.

  • InvSwitcher hooks into that game mode's worlds, even if they are not in the worlds list.
  • The requested options apply in those worlds only. The config file is not changed and other worlds keep the configured options.
  • Only options.* can be asked for, and not money. The economy and the worlds list are the admin's.
  • What was asked for is logged at startup.
  • A new game-mode-requests config section turns requests off altogether (allow: false) or for named game modes (ignore).

Testing

  • Unit tests pass, with new ones for team members and for requests (applied, refused, ignored).
  • Booted a Paper 26.3 server with Boxed and an empty worlds list: InvSwitcher hooked into the Boxed worlds and logged the requested option.
  • Played with two boxes as the owner: inventory and advancements switched between them. A team member has only been covered by unit tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git

tastybento and others added 2 commits November 24, 2026 17:40
Island-specific inventories, advancements and the rest were only switched
for the owner of an island. Team members kept whatever they had, so a
member of two islands carried one set of data between them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
A game mode can ask for the options it needs through BentoBox's
getRequestedSettings. InvSwitcher then hooks into that game mode's worlds
and uses the requested options there only. The config file is not changed
and other worlds keep the configured options. Money, the economy and the
worlds list cannot be asked for.

The new game-mode-requests section of the config turns requests off
altogether or for named game modes. Builds against BentoBox 3.25.0 and
still runs on older versions, where there are no requests.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
@tastybento tastybento changed the title Switch per-island data for team members, not only owners Team-member island switching; honor game mode option requests Nov 25, 2026
tastybento and others added 2 commits November 24, 2026 18:03
BentoBox 3.25.0 is built for Java 25, so depending on it broke the build
here. The request method is now found by name on the game mode and the
requests are applied by a class in this addon, so the BentoBox dependency
goes back to 3.17.0-SNAPSHOT.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit 50a8128 into develop Nov 25, 2026
3 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.

1 participant