Skip to content

Fix duplicate permission keys in addon.yml (1.22.1)#171

Merged
tastybento merged 1 commit into
developfrom
fix/addon-yml-duplicate-permission-keys
Jun 27, 2026
Merged

Fix duplicate permission keys in addon.yml (1.22.1)#171
tastybento merged 1 commit into
developfrom
fix/addon-yml-duplicate-permission-keys

Conversation

@tastybento

Copy link
Copy Markdown
Member

Problem

Server 26.2 logs duplicate keys found warnings on load:

[WARN]: [org.bukkit.configuration.file.YamlConstructor] duplicate keys found : acidisland.island.name
[WARN]: ... acidisland.island.ban (x2)
[WARN]: ... acidisland.island.team.coop / trust / promote
[WARN]: ... acidisland.admin.tp (x2)
[WARN]: ... acidisland.mod.team.add / kick / disband / setowner / fix
[WARN]: ... acidisland.admin.resets.remove

These keys are permission nodes in src/main/resources/addon.yml, not the locale files. Several commands legitimately share one permission node (e.g. /ai ban, /ai unban, /ai banlist all use acidisland.island.ban), but they had been written as separate YAML entries with identical keys. YAML collapses duplicate keys to the last one — so earlier descriptions were silently dropped — and emits the warning.

Fix

Consolidate each shared node into a single entry with a combined description, matching the BSkyBlock convention. Affected nodes:

  • acidisland.island.name (setname / resetname)
  • acidisland.island.ban (ban / unban / banlist)
  • acidisland.island.team.coop / .trust / .promote
  • acidisland.admin.tp (tp / tpnether / tpend)
  • acidisland.mod.team.add / .disband / .fix / .kick / .setowner
  • acidisland.admin.resets.remove (resets reset / resets remove)

Verified against BentoBox core that /acid resets reset and /acid resets remove genuinely share admin.resets.remove (AdminResetsResetCommand calls setPermission("admin.resets.remove")), so the node is kept rather than split. The locale files themselves had no duplicate keys.

Bumps version to 1.22.1.

🤖 Generated with Claude Code

Several commands share a single permission node (e.g. /ai ban, /ai
unban and /ai banlist all use acidisland.island.ban), but these were
written as separate YAML entries with identical keys. YAML collapses
duplicate keys to the last entry and the server logs "duplicate keys
found" warnings on load.

Consolidate each shared node into a single entry with a combined
description, matching the BSkyBlock convention. Affected nodes:
island.name, island.ban, island.team.coop/trust/promote, admin.tp,
mod.team.add/disband/fix/kick/setowner, and admin.resets.remove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit 6fdfd3d into develop Jun 27, 2026
3 checks passed
@tastybento tastybento mentioned this pull request Jun 27, 2026
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