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

Change advancement form mechanics to match Java behaviour, fix NPE #5396

Merged

Conversation

eclipseisoffline
Copy link
Member

This PR changes the behaviour of the Geyser advancements form a bit. Now, when a ClientboundSelectAdvancementsTabPacket is received, Geyser stores the specified tabId, but only shows the category form when the user is already viewing advancements. If the user is not viewing advancements, then the tabId is stored, and the user is automatically redirected to the stored category when the user uses /geyser advancements.

The same goes for when a user closes and reopens the advancements form - the form will be at the same category as it was when the user closed it, or the root menu form if the user wasn't at any category.

These changes match Java behaviour, and should also resolve a NPE described in #5394 (when tabId is null), which this PR should fully resolve.

Copy link
Member

@onebeastchris onebeastchris left a comment

Choose a reason for hiding this comment

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

thanks for looking into this!

@onebeastchris onebeastchris merged commit 679bc41 into GeyserMC:master Mar 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants