feat: per-world team disable + admin team disbandall (#2965)#2975
Merged
Conversation
Introduces WorldSettings#isTeamsDisabled() so game modes can opt out of the team subsystem on a per-world basis. When enabled, every island/admin team sub-command except trust, coop, untrust and uncoop refuses to run and surfaces commands.island.team.errors.teams-disabled. Trust and coop relationships remain available as the supported alternative. Adds the admin team disbandall command for stripping pre-existing team members and sub-owners from every island in a world when flipping the flag on. Trusted and coop players are left alone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
tastybento
added a commit
that referenced
this pull request
May 9, 2026
- AdminTeamDisbandAllCommandTest: replace any(Long.class) with anyLong() to avoid an autounbox NPE during Mockito stubbing. - Sync the four keys added in #2975 (admin team disbandall.{description, confirmation,success} + island team errors.teams-disabled) into all 22 bundled locales so non-English servers don't surface raw keys. - Tighten WorldSettings#isTeamsDisabled() Javadoc to list the commands actually blocked rather than the broader "every island team *" claim, and to call out that read-only commands and trust/coop are unaffected. 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.



Summary
WorldSettings#isTeamsDisabled()(defaultfalse) andIslandWorldManager#isTeamsDisabled(World)so game modes can switch off the team subsystem per world. When enabled,island team invite/accept/kick/leave/promote/demote/setownerandadmin team addrefuse withcommands.island.team.errors.teams-disabled. Trust/coop/untrust/uncoop are intentionally unaffected.admin team disbandallto strip every member and sub-owner from every island in the world (trusted/coop players preserved), for cleaning up pre-existing teams when flipping the flag on.AdminTeamAddCommand,IslandTeamInviteCommand, and the newAdminTeamDisbandAllCommand.Closes #2965.
Test plan
./gradlew test --tests "world.bentobox.bentobox.api.commands.admin.team.*" --tests "world.bentobox.bentobox.api.commands.island.team.IslandTeamInviteCommandTest"isTeamsDisabled() == true, verify/is team inviteand adminteam addare refused with the new messagetrust,coop,untrust,uncoopstill work in that worldadmin team disbandall, confirm with the printed token, and verify members/sub-owners are removed while trusted/coop relationships survive🤖 Generated with Claude Code