Declare the border colour and bordertype permissions - #180
Merged
Conversation
The permissions the commands actually check were missing from addon.yml, so they had no declared default and fell back to op only - which contradicts the documentation and stops a player from using /[gamemode] border color at all. [gamemode].bordertype was declared but never checked: BorderTypeCommand asks for border. + its label, i.e. [gamemode].border.bordertype. Found while tracing #179. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E6rYr6Z66LQz9XTbnbUupy
|
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.



Found while investigating #179.
addon.ymldid not declare the permissions the commands actually check:[gamemode].border.color— checked byBorderColorCommand(both/[gamemode] border colorand/[gamemode] bordercolor). Undeclared, so it had no default and fell back to op only, which contradicts the documentation and stopped players from using the command at all. Declaredtrue, with the colours themselves gated as documented.[gamemode].border.color.red|green|blue— checked inBorderColorCommand#execute, documented as op. Now declared.[gamemode].bordertypewas declared but is never checked:BorderTypeCommandasks forborder.+ its label, i.e.[gamemode].border.bordertype. Renamed the declaration to the permission that is really used, keeping itsfalsedefault.This is not the cause of the exception in #179 — that is BentoBoxWorld/BentoBox#3042 — but it is why the colour command was unusable for the reporting player in the first place.
Border's tests pass (104 tests, 0 failures).
🤖 Generated with Claude Code
https://claude.ai/code/session_01E6rYr6Z66LQz9XTbnbUupy