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

Fix incorrect command node serialization by creating new Command #11671

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

Commits on Nov 26, 2024

  1. Fix incorrect command serialization by creating new Command

    Fixes PaperMC#11649 - As noted in the issue, when CommandNodes are serialized
    they are used as the key in a Map. Their equals()/hashcode() should only    match if they are equal nodes (name & command), but due to the erasure of the command field pre-serialization, nodes with different commands can be mapped onto the same value. This causes the client to interpret both nodes as the same, causing suggestions where they should not.
    
    This is fixed by creating a different no-op command for the
    erasure, instead of them holding the same lambda.
    Rickyboy320 committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    0aa738c View commit details
    Browse the repository at this point in the history