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

Pinging servers from lower versions or with ViaVersions causes a NullPointerException #726

Closed
geza3D opened this issue Feb 26, 2023 · 1 comment

Comments

@geza3D
Copy link

geza3D commented Feb 26, 2023

The cause

This issue is caused by the fact that servers below 1.19.1 send the ClientboundStatusResponsePacket without the enforcesSecureChat boolean field (previously also known as the previewsChat boolean field). Since this field is non-existent in lower versions, trying to do a STATUS connection to a server from these versions will fail, and throw a NullPointerException.

The fix

Check if the field is null, and if it is, then default to false.

andreypfau added a commit to andreypfau/MCProtocolLib that referenced this issue Oct 4, 2023
@onebeastchris
Copy link
Member

We forgot to close this - it was fixed in 060a4ee. Thanks for reporting!

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

No branches or pull requests

2 participants