Skip to content

Don't auto-create any brig redirects#11954

Merged
Machine-Maker merged 6 commits intoPaperMC:mainfrom
Machine-Maker:fix/brig-redirects
Feb 16, 2025
Merged

Don't auto-create any brig redirects#11954
Machine-Maker merged 6 commits intoPaperMC:mainfrom
Machine-Maker:fix/brig-redirects

Conversation

@Machine-Maker
Copy link
Copy Markdown
Member

@Machine-Maker Machine-Maker commented Jan 12, 2025

Supersedes #11794
Supersedes #11953
Fixes #10827
Fixes #11647
Fixes #11384


Don't automatically create any brig-style redirects. For alises and namespace:command, just copy over the requirement, command, redirect and children to a new literal. Also do this for the vanilla namespaced commands. This should solve all redirect issues (at least the ones not inherently part of brig itself like nested redirects).

@Warriorrrr Warriorrrr added the type: bug Something doesn't work as it was intended to. label Jan 12, 2025
@Machine-Maker Machine-Maker marked this pull request as ready for review January 12, 2025 14:39
@Machine-Maker Machine-Maker requested a review from a team as a code owner January 12, 2025 14:39
@lynxplay
Copy link
Copy Markdown
Contributor

image
posting here to also take owen with me to the grave if this has a bug our testing did not find.

@Machine-Maker Machine-Maker merged commit 84609dc into PaperMC:main Feb 16, 2025
3 checks passed
@Machine-Maker Machine-Maker deleted the fix/brig-redirects branch February 16, 2025 21:55
booky10 added a commit to booky10/Paper that referenced this pull request Mar 3, 2025
The redirect flattening previously copied over
children nodes without checking node
requirements (e.g. permissions)

Before PaperMC#11954, this issue caused node
requirements to be ignored for second-level
command nodes created using the brigadier api
(if namespaced commands were prevented from
being sent using the spigot config option)

Since PaperMC#11954 is merged now, it's much less
of an issue
booky10 added a commit to booky10/Paper that referenced this pull request May 7, 2025
The redirect flattening previously copied over children nodes
without checking node requirements (e.g. permissions)

Before PaperMC#11954, this issue caused node requirements to be ignored
for second-level command nodes created using the brigadier api
(if namespaced commands were prevented from being sent
using the spigot config option)

Since PaperMC#11954 is merged now, it's much less of an issue
But as PaperMC#12136 has been merged, it still is an issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something doesn't work as it was intended to.

Projects

Status: Merged

3 participants