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 config option for player name regex #4396

Conversation

TPGamesNL
Copy link
Member

Description

Adds a config option for the player name regex pattern.

Also includes changes from #4367, thanks @AyhamAl-Ali for that!


Target Minecraft Versions: any
Requirements: none
Related Issues: #4374, #4367

@TPGamesNL TPGamesNL added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Oct 31, 2021
Copy link

@SaFiKiK SaFiKiK left a comment

Choose a reason for hiding this comment

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

Could you please change the min length from 1 to 3, since min. allowed nickname length is 3? It will make less unneeded Bukkit API calls if players make mistakes in commands

@TheLimeGlass
Copy link
Contributor

TheLimeGlass commented Jan 14, 2022

There are still player names with 2 characters. Although extremely rare they'll join your server, there are a few accounts.

I believe Mojang confiscated the accounts that were inactive or compromised, but still allowed 2 letter account names that were active.

There is a Youtube documentary on the user that still actively plays on Xa or Xe.

@TheBentoBox
Copy link
Member

There are people with 1 letter names too. The person named "G" joined my server a handful of years ago. They were still active as of 2019 too, at which point they swapped to a lowercase "g". It should be left as 1 character min.

@TheLimeGlass
Copy link
Contributor

TheLimeGlass commented Jan 14, 2022

If we want to be reducing Mojang API lookups, we can loop Bukkit.getOfflinePlayers() first, which doesn't do API calls then use the Bukkit method. We can also cache OfflinePlayers that get returned, although I think the Bukkit server does this. I couldn't find any information if the server caches the results itself.

@TPGamesNL
Copy link
Member Author

In that case I'll change it back to a minimum of 1 character (I'm just gonna assume Mojang did not allow a 0 character name).

@TPGamesNL TPGamesNL marked this pull request as draft March 6, 2022 18:53
@TPGamesNL TPGamesNL marked this pull request as ready for review March 7, 2022 18:38
@TPGamesNL TPGamesNL merged commit 5ee1b98 into SkriptLang:master Mar 7, 2022
@TPGamesNL TPGamesNL deleted the enhancement/player-matching-regex-geyser branch March 7, 2022 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants