Skip to content

Conversation

@Jikoo
Copy link
Owner

@Jikoo Jikoo commented Oct 20, 2025

  • Add prefix for view-only state
  • Add permission nodes for fine-grained control of behavior when accessing

This contains an internal structural change to refactor out duplicate code, and I don't know why I didn't do it this way from the start (Was I just lazy? Was there some error?), so I probably should test pretty extensively. Modern Paper should be fine, but 1.21.4 and below may be indirectly wonky, and Spigot is always a bit of a mess due to the way it's set up. I may also try to make the generics a little less gross.

  • Update wiki with new nodes
  • Test

Closes #341
Closes #344

@Jikoo
Copy link
Owner Author

Jikoo commented Oct 20, 2025

Oh, another note to self: I left a comment (now in common's OpenSyncMenu) that certain shadowed fields may be removable when 1.21.4 is dropped. It may be a good idea to revisit that as part of this PR, because 1.21.4 already had separate sync process overrides. The current sync restrictions may be Spigot-specific, too.

@Jikoo
Copy link
Owner Author

Jikoo commented Oct 26, 2025

Looking like dropping lower 1.21 versions might be a good idea anyway. When testing on 1.21.4, I got errors about access to the endpoint used to look up players by name being denied. Vanilla commands, too, like /op, not just OI commands. Probably for the next release after the one containing this.

@Jikoo
Copy link
Owner Author

Jikoo commented Oct 28, 2025

Another note: No feedback when inventory fails to open due to lack of access. May want to move access check into generic command's permission checks to impose fewer restrictions on other plugins' behavior if they try to open OI's views.

I think this needs a modification of the method signature, which is why I didn't do it in the first place.

Add view-only parameter to opening process
Deprecate old API rather than worry about defaults causing unexpected behavior
Bump minor version due to API changes
@Jikoo Jikoo merged commit d8b5aa1 into master Nov 3, 2025
2 checks passed
@Jikoo Jikoo deleted the dev/improve-access branch November 3, 2025 14:51
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.

Permission override for settings.equal-access Access level permission caused me some confusion with OPs

2 participants