Skip to content

Fix bundled spark permission check#11355

Merged
lynxplay merged 1 commit into
PaperMC:masterfrom
lucko:fix/spark-permission-check
Sep 6, 2024
Merged

Fix bundled spark permission check#11355
lynxplay merged 1 commit into
PaperMC:masterfrom
lucko:fix/spark-permission-check

Conversation

@lucko
Copy link
Copy Markdown
Contributor

@lucko lucko commented Sep 2, 2024

Fixes the issue reported in lucko/spark#444

A brief summary is that currently, the bundled spark command is not registered unless the sender has the "spark" permission, whereas it should be registered if the sender has the base "spark" wildcard permission or permission for any of the spark sub-commands.

The fix uses the same approach as the built-in /paper command, using ; as delimiter:

+ this.setPermission(String.join(";", permissions));

We could alternatively override the testPermissionSilent() method in org.bukkit.Command, but I thought the first option would be preferable.

Related commit in spark lucko/spark@55b3839

@lucko lucko requested a review from a team as a code owner September 2, 2024 19:56
@lynxplay lynxplay merged commit 691d452 into PaperMC:master Sep 6, 2024
LeonTG pushed a commit to LeonTG/Paper that referenced this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants