Skip to content

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

Merged
Warriorrrr merged 24 commits into
PaperMC:mainfrom
Mickey42302:random
Oct 22, 2026
Merged

Warriorrrr merged 24 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

@papermc-projects papermc-projects Bot moved this from Delayed approval to Full approval in Paper PR Queue Oct 20, 2026
@Warriorrrr
Warriorrrr merged commit e65c076 into PaperMC:main Oct 22, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Full approval to Merged in Paper PR Queue Oct 22, 2026
@Mickey42302
Mickey42302 deleted the random branch October 22, 2026 20:50
granny added a commit to PurpurMC/Purpur that referenced this pull request Oct 23, 2026
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@0db5c93a Add helper methods for vanilla-style command feedback PaperMC/Paper#14331
PaperMC/Paper@ac9a1b2c Make Color implement adventure ARGBLike PaperMC/Paper#14349
PaperMC/Paper@e65c0765 Add permissions for reset and sequence arguments in /random PaperMC/Paper#14128
PaperMC/Paper@0d9bf08a [ci/skip] Fix broken test plugin refs
PaperMC/Paper@2f1ce01e Improve swing hand API to respect item ATTACK_ANIMATION component PaperMC/Paper#14363
PaperMC/Paper@d86d4274 Call PlayerBucketEmptyEvent for Sulfur Cube in Bucket PaperMC/Paper#14150
PaperMC/Paper@325f9071 Clear scoreboard team entries on unregister PaperMC/Paper#14159
PaperMC/Paper@1b9bf5c8 Add EntityPotentSulfurLaunchEvent PaperMC/Paper#14237
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