Skip to content

AdminTeamKick: require x,y,z coordinates when player is on multiple islands#2967

Merged
tastybento merged 3 commits intodevelopfrom
copilot/fix-admin-team-kick-behavior
May 8, 2026
Merged

AdminTeamKick: require x,y,z coordinates when player is on multiple islands#2967
tastybento merged 3 commits intodevelopfrom
copilot/fix-admin-team-kick-behavior

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

/bbox admin team kick <player> was silently kicking multi-island players from every island at once — a sharper tool than most admins expect, with no way to scope the action to a single island.

Changes

AdminTeamKickCommand

  • Single island: /bbox admin team kick <player> — works with one argument; the target's only team island is resolved automatically.
  • Multiple islands: /bbox admin team kick <player> x,y,z — when the target belongs to more than one team island, the x,y,z coordinates of the desired island must be supplied. Omitting them shows player-has-more-than-one-island plus a coordinate line for each island; supplying an unrecognised coordinate shows unknown-island-location.
  • getMemberIslandsXYZ: private helper that builds a x,y,z → Island map for all team islands the target is a member of (mirrors AdminTeamDisbandCommand).
  • Tab completion: suggests the x,y,z of each island the target belongs to when completing the second argument.
  • Reuses existing commands.admin.unregister.errors.* locale keys — no new locale keys required.

en-US.yml

  • parameters: <team player><team player> [x,y,z]
  • Removed the orphaned success-all key.

…or multi-island kick

Agent-Logs-Url: https://github.com/BentoBoxWorld/BentoBox/sessions/6e406756-8081-4292-bb63-00f6fe227777

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix admin team kick to only remove player from specified island AdminTeamKick: default to current island, add --all for sweep-all behaviour May 5, 2026
Copilot AI requested a review from tastybento May 5, 2026 15:30
@tastybento
Copy link
Copy Markdown
Member

@copilot I want a different solution. If the user has multiple islands, then require them to be specified using the x,y,z coordinates. This can be obtained using a tab to find them or written explicitly. This approach is already used with admin commands, like AbstractAdminRangeCommand.java.

…er review feedback

Agent-Logs-Url: https://github.com/BentoBoxWorld/BentoBox/sessions/ee9782ec-6693-42a2-a6e3-d0f6775b1387

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot I want a different solution. If the user has multiple islands, then require them to be specified using the x,y,z coordinates. This can be obtained using a tab to find them o...

Done in 99cb1f2. Replaced the --all flag with the x,y,z coordinate approach already used by AbstractAdminRangeCommand and AdminTeamDisbandCommand:

  • 1 island/bbox admin team kick <player> works with one argument as before
  • Multiple islands → x,y,z required: shows commands.admin.unregister.errors.player-has-more-than-one-island + one coordinate line per island, then commands.admin.unregister.errors.unknown-island-location if an unrecognised coord is supplied
  • Tab completion suggests the island x,y,z values when completing the second argument
  • Locale: parameters updated to <team player> [x,y,z]; orphaned success-all key removed

Copilot AI changed the title AdminTeamKick: default to current island, add --all for sweep-all behaviour AdminTeamKick: require x,y,z coordinates when player is on multiple islands May 7, 2026
@tastybento tastybento marked this pull request as ready for review May 8, 2026 00:18
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@tastybento tastybento merged commit d8bef6c into develop May 8, 2026
3 checks passed
@tastybento tastybento deleted the copilot/fix-admin-team-kick-behavior branch May 8, 2026 00:50
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.

Admin team kick on multi-island players kicks from all islands at once

2 participants