Drop legacy quantumrpg/divinity dual-namespace permission shim - #326
Open
Travja wants to merge 2 commits into
Open
Drop legacy quantumrpg/divinity dual-namespace permission shim#326Travja wants to merge 2 commits into
Travja wants to merge 2 commits into
Conversation
Perms.has() accepted both the quantumrpg.* and divinity.* namespaces as equivalent, but the plugin only ever grants quantumrpg.* nodes (Perms.PREFIX). Replace all call sites with the plain Permissible#hasPermission() check and remove the now-unused divinity.* permission declarations from plugin.yml that existed solely to back the removed shim.
The previous commit dropped both the Perms.has() dual-namespace shim AND the divinity.* permission declarations in plugin.yml, which would have broken any server whose permission plugin grants divinity.* nodes directly instead of quantumrpg.* ones. plugin.yml's divinity.* entries already alias to quantumrpg.* via Bukkit's native permission `children` mechanism (granting divinity.x automatically implies quantumrpg.x) — the same signal path the Java code now checks directly via Permissible#hasPermission(). Keep those declarations in plugin.yml unchanged; only the Java call sites change from the custom Perms.has() shim to native hasPermission(). This keeps existing divinity.* grants working with zero runtime cost and no admin action required.
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.
Split out of #320 (piece 1/12, independent).
Perms.has()accepted both thequantumrpg.*anddivinity.*namespaces as equivalent, but the plugin only ever grantsquantumrpg.*nodes (Perms.PREFIX). This replaces all call sites with the plainPermissible#hasPermission()check.No behavior change for servers using the standard
quantumrpg.*permissions.Backward compatibility
plugin.yml's
divinity.*permission declarations are kept unchanged — they already alias toquantumrpg.*via Bukkit's native permissionchildrenmechanism (grantingdivinity.xautomatically impliesquantumrpg.x), which is exactly the signal the simplified Java code now checks. Any server whose permission plugin grantsdivinity.*nodes directly keeps working with zero config changes required.