Skip to content

Fix biome permission node declarations and clearPerms NPE#144

Merged
minoneer merged 2 commits into
masterfrom
fix/biome-permission-nodes
Jun 11, 2026
Merged

Fix biome permission node declarations and clearPerms NPE#144
minoneer merged 2 commits into
masterfrom
fix/biome-permission-nodes

Conversation

@minoneer

Copy link
Copy Markdown
Member

Summary

  • Declare the six biomes offered by biomes.yml but missing from plugin.yml: flower_forest, lukewarm_ocean, lush_caves, savanna_plateau, snowy_plains, snowy_slopes. The bundled challenges.yml already rewards usb.biome.flower_forest (Flower Power, Florist) even though the node was never declared.
  • Fix the usb.biome.* group child entry for ocean: usb.biome.ocean: false inverts the parent grant under Bukkit child semantics, so granting usb.biome.* actively revoked ocean. The # default: true comment shows the original intent ("already default, skip it") — the actual effect was a negation.
  • Guard against null PlayerInfo in uSkyBlock.clearPlayerInventory: getPlayerInfo can return null (e.g. maintenance mode) and the clearPerms branch dereferenced it unguarded, three lines after the sibling branches null-check the same variable.

Behavior notes for the changelog

  • Declaring the six nodes with default: false (consistent with the other twelve) removes the implicit op access that undeclared Bukkit nodes get. Ops who relied on op implying the six undeclared biomes need an explicit grant (or usb.biome.*).
  • usb.biome.* now grants ocean instead of revoking it. Setups that relied on the (buggy) revocation would need an explicit negation in their permissions plugin.

Test Plan

  • :uSkyBlock-Core:build green (includes test suite)
  • Manual: grant usb.biome.* and verify ocean appears in the biome GUI alongside all 18 biomes

These were found while auditing the stale independent-biome-unlocking branch; the actual biome-unlocking feature is deferred to the 4.0 challenge rework (issue to follow). These three fixes are correct in isolation.

🤖 Generated with Claude Code

minoneer and others added 2 commits June 11, 2026 21:41
Declare the six biomes offered by biomes.yml but missing from
plugin.yml (flower_forest, lukewarm_ocean, lush_caves,
savanna_plateau, snowy_plains, snowy_slopes). The bundled
challenges.yml already rewards usb.biome.flower_forest even though
the node was never declared. Note: declaring them with
default: false removes the implicit op-only access undeclared
nodes had.

Also fix the usb.biome.* group child entry for ocean: a child
value of false inverts the parent grant in Bukkit, so granting
usb.biome.* actively revoked ocean instead of including it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
getPlayerInfo can return null (e.g. maintenance mode); the
clearPerms branch dereferenced it unguarded three lines after the
sibling branches null-checked the same variable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@minoneer minoneer merged commit e1a10c2 into master Jun 11, 2026
1 check passed
@minoneer minoneer deleted the fix/biome-permission-nodes branch June 11, 2026 19:52
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