Skip to content

Add Island Defaults tab to Admin Settings GUI for editing default protection flags#2912

Merged
tastybento merged 2 commits into
developfrom
copilot/add-default-island-protection-tab
Apr 5, 2026
Merged

Add Island Defaults tab to Admin Settings GUI for editing default protection flags#2912
tastybento merged 2 commits into
developfrom
copilot/add-default-island-protection-tab

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

Default island protection flag rank values (applied to new islands) could only be changed via config files. This adds a GUI tab to the admin settings panel (/admin settings) for editing them directly.

New classes

  • IslandDefaultCycleClick — Click handler that cycles default island protection flag ranks through the rank ladder, persisting to WorldSettings.getDefaultIslandFlagNames() and saving via GameModeAddon.saveWorldSettings()
  • IslandDefaultSettingsTab — Tab extending SettingsTab for PROTECTION flags, displaying current default ranks and wiring up IslandDefaultCycleClick per flag

Changes

  • AdminSettingsCommand — Added tab 3 (IslandDefaultSettingsTab) to the no-args admin settings panel
  • en-US.yml — Added ISLAND_DEFAULTS locale block (title + description)
  • TestWorldSettings — Added mutable defaultIslandFlagNames backing map so the default implementation of getDefaultIslandFlagNames() persists changes during tests

The admin settings panel now shows three tabs:

  1. World Settings (world-level flag toggles)
  2. World Protections (protection flag on/off outside islands)
  3. Island Defaults (default rank for each protection flag on new islands)

Copilot AI linked an issue Apr 5, 2026 that may be closed by this pull request
…tection flags

Creates a new tab in the Admin Settings panel (opened with /admin settings)
that allows admins to change the default protection flag rank values that
new islands will receive.

New classes:
- IslandDefaultCycleClick: Click handler that cycles default island
  protection flag ranks and saves to world settings
- IslandDefaultSettingsTab: Tab showing protection flags with their
  default rank values for new islands

Changes:
- AdminSettingsCommand: Added tab 3 with IslandDefaultSettingsTab
- TestWorldSettings: Added mutable defaultIslandFlagNames map
- en-US.yml: Added ISLAND_DEFAULTS locale strings

Agent-Logs-Url: https://github.com/BentoBoxWorld/BentoBox/sessions/aab884c0-0f55-4fa7-bc57-6d52f03a5992

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GUI option for default island protection flags Add Island Defaults tab to Admin Settings GUI for editing default protection flags Apr 5, 2026
Copilot AI requested a review from tastybento April 5, 2026 23:25
@tastybento tastybento marked this pull request as ready for review April 5, 2026 23:29
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 5, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
5.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@tastybento tastybento merged commit d0784d6 into develop Apr 5, 2026
2 of 3 checks passed
@tastybento tastybento deleted the copilot/add-default-island-protection-tab branch April 5, 2026 23:55
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.

Default Island Protection Flag Value Changing

2 participants