Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy forward when registering alias (fixes #10827) #11794

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ookiegajwa
Copy link

When flattening any command or registering an alias to a node with no direct children (such as a redirect), the code now takes into account any potential redirect/fork/forward on the target node. This fixes the issue where, when registering a command that was simply a redirect, only the namespaced literal would work, and not any aliases of the command.

This fixes #10827 and has been reopened post hard-fork from #10952

When flattening any command or registering an alias to a node with no direct children (such as a redirect), the code now takes into account any potential redirect/fork/forward on the target node. This fixes the issue where, when registering a command that was simply a redirect, only the namespaced literal would work, and not any aliases of the command.
@ookiegajwa ookiegajwa requested a review from a team as a code owner December 23, 2024 20:14
@kennytv kennytv added the type: bug Something doesn't work as it was intended to. label Dec 24, 2024
Copy link
Member

@Owen1212055 Owen1212055 left a comment

Choose a reason for hiding this comment

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

Looks good to me, the intention of that code is to essentially make that new node act identical to redirectTo, rather than redirecting to redirectTo. This avoids some vanilla bugs.

This was missed, it seems.

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: Awaiting final testing
Development

Successfully merging this pull request may close these issues.

Redirect with brigadier API does not work as expected
3 participants