Fix biome permission node declarations and clearPerms NPE#144
Merged
Conversation
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>
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
biomes.ymlbut missing fromplugin.yml:flower_forest,lukewarm_ocean,lush_caves,savanna_plateau,snowy_plains,snowy_slopes. The bundledchallenges.ymlalready rewardsusb.biome.flower_forest(Flower Power, Florist) even though the node was never declared.usb.biome.*group child entry for ocean:usb.biome.ocean: falseinverts the parent grant under Bukkit child semantics, so grantingusb.biome.*actively revoked ocean. The# default: truecomment shows the original intent ("already default, skip it") — the actual effect was a negation.PlayerInfoinuSkyBlock.clearPlayerInventory:getPlayerInfocan return null (e.g. maintenance mode) and theclearPermsbranch dereferenced it unguarded, three lines after the sibling branches null-check the same variable.Behavior notes for the changelog
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 (orusb.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:buildgreen (includes test suite)usb.biome.*and verify ocean appears in the biome GUI alongside all 18 biomesThese were found while auditing the stale
independent-biome-unlockingbranch; 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