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

Add '.' to valid usernames to support GeyserMC #416

Closed
wants to merge 1 commit into from

Conversation

irishgreencitrus
Copy link

Objective

Allow GeyserMC players to connect to a Valence server if GeyserMC is installed on the proxy and the Valence server is behind it (there is no way to support GeyserMC directly on Valence and there probably never will be)

Solution

  • GeyserMC uses a '.' prefix to distinguish Bedrock players
  • Allow '.' in the valid names
  • Bedrock players can now connect

@rj00a
Copy link
Member

rj00a commented Jul 16, 2023

What happens if someone with a 16 character username joins the server? I'm guessing GeyserMC would prepend the . character and push the username over the 16 character max, causing is_valid_username to return false.

I also see that the LoginHelloC2SPacket from vanilla MC has a 16 character limit on the name field. Does geyser do something to get around this?

@rj00a
Copy link
Member

rj00a commented Jul 16, 2023

Regardless, I think we should just delete the is_valid_username function here. The client doesn't have any problem handling usernames with unusual characters, and proper username validation will happen in online mode by the auth server anyway.

@irishgreencitrus
Copy link
Author

Regardless, I think we should just delete the is_valid_username function here. The client doesn't have any problem handling usernames with unusual characters, and proper username validation will happen in online mode by the auth server anyway.

I think that's a good shout. Valence also seems to have no problems with invalid characters in usernames, so this limitation seems artificial. It can also be re-enabled by the user in a bevy system if desired.

@rj00a
Copy link
Member

rj00a commented Jul 24, 2023

Closing in favor of #420

@rj00a rj00a closed this Jul 24, 2023
rj00a added a commit that referenced this pull request Jul 24, 2023
# Objective

Remove unnecessary username validation to support GeyserMC usernames.

# Solution

Remove `is_valid_username` as discussed in #416.
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