Skip to content

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

Closed
ookiegajwa wants to merge 1 commit intoPaperMC:masterfrom
ookiegajwa:fix/brigadier-redirects
Closed

Copy forward when registering alias (fixes #10827)#10952
ookiegajwa wants to merge 1 commit intoPaperMC:masterfrom
ookiegajwa:fix/brigadier-redirects

Conversation

@ookiegajwa
Copy link
Copy Markdown
Contributor

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 is now correctly based on a non-master branch :)

@ookiegajwa ookiegajwa requested a review from a team as a code owner June 21, 2024 23:38
@Owen1212055
Copy link
Copy Markdown
Member

Thanks for the PR! Looks good to me, not sure why that wasn’t originally done… that bit of code was missing some logic previously :P

@kennytv kennytv added the priority: high This issue is either a gamebreaking bug or crash and needs to be addressed soon. label Jun 22, 2024
@kennytv kennytv force-pushed the fix/brigadier-redirects branch 2 times, most recently from 6f74e5f to 53345db Compare July 15, 2024 19:54
@ookiegajwa ookiegajwa force-pushed the fix/brigadier-redirects branch from 53345db to 519cd7f Compare August 10, 2024 19:06
@ookiegajwa
Copy link
Copy Markdown
Contributor Author

Rebased to 1.21.1, tested again, still works :)

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 force-pushed the fix/brigadier-redirects branch from c10d571 to 7a8e878 Compare December 21, 2024 19:23
@ookiegajwa ookiegajwa closed this Dec 23, 2024
@ookiegajwa ookiegajwa deleted the fix/brigadier-redirects branch December 23, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pre-softspoon priority: high This issue is either a gamebreaking bug or crash and needs to be addressed soon.

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

Redirect with brigadier API does not work as expected

4 participants