Skip to content

Add permissions for "reset" and sequence arguments in "/random". - #14128

Open
Mickey42302 wants to merge 18 commits into
PaperMC:mainfrom
Mickey42302:random
Open

Mickey42302 wants to merge 18 commits into
PaperMC:mainfrom
Mickey42302:random

Conversation

@Mickey42302

Copy link
Copy Markdown
Contributor

Hello,

I would like to suggest implementing some additional permission nodes for "/random".

Currently, the "reset" subcommand and sequence arguments only work if a player has operator privileges. This is the case even if a regular player has the "minecraft.command.random" permission.

This addition would allow server owners to grant the ability to use sequences and the "reset" subcommand without needing to grant operator privileges.

For the "reset" subcommand, the permission node is "minecraft.command.random.reset". For sequence arguments, the permission node is "minecraft.command.random.sequence".

@Mickey42302
Mickey42302 requested a review from a team as a code owner July 30, 2026 16:02
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jul 30, 2026
@github-project-automation github-project-automation Bot moved this from Awaiting review to Changes required in Paper PR Queue Aug 2, 2026
@Mickey42302

Copy link
Copy Markdown
Contributor Author

The code is updated now.

@Mickey42302

Copy link
Copy Markdown
Contributor Author

Are any more changes needed?

@Warriorrrr Warriorrrr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks fine, the default hasPermission always returns true for ops so the or doesn't really seem necessary, plus this allows you to disable it for ops if you really wanted to do that.

Since this is adding new command permissions, you should also create a PR to our docs repo to document this & keep it up to date.

@Mickey42302

Copy link
Copy Markdown
Contributor Author

I've opened a pull request which adds the new permission nodes to the documentation. It can be found here:

PaperMC/docs#804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Delayed approval

Development

Successfully merging this pull request may close these issues.

3 participants