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 Geyser prefix option #4374

Closed
1 task done
SaFiKiK opened this issue Oct 23, 2021 · 4 comments
Closed
1 task done

Add Geyser prefix option #4374

SaFiKiK opened this issue Oct 23, 2021 · 4 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@SaFiKiK
Copy link

SaFiKiK commented Oct 23, 2021

Suggestion

In Skript 2.6 regex to parse OfflinePlayer was changed to fix the lag exploit, but it introduced a new problem for servers which support Bedrock Edition players.
Add an option "geyser-prefix" to config so that Skript could recognise both players from Bedrock Edition and Java. Geyser adds a single character prefix to player names and because of regex, commands containing <offlineplayer> as arguments can't parse their names and throw an error which states the following:

There is no player online whose name starts with `*playername`

Basically, it shouldn't be hard expanding regex with just a single character. Default value could be an asterisk (*).

Why?

Basically, this option is needed for servers which accept both Bedrock Edition players and Java. It will allow correct parsing of Bedrock players for both arguments and strings parsed as OfflinePlayer. There is a way to kinda "fix" that just by storing uuid in a list and then parse it as OfflinePlayer, but this takes a lot of code changes instead of just adding an option which will allow to keep code clean.

Other

No response

Agreement

  • I have read the guidelines above and confirm I am following them with this suggestion.
@TheLimeGlass TheLimeGlass added enhancement Feature request, an issue about something that could be improved, or a PR improving something. good first issue An issue that would be good for a first-time contributor to make a PR for priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Oct 24, 2021
@TheLimeGlass
Copy link
Collaborator

Reference https://github.com/GeyserMC/Geyser

@TPGamesNL
Copy link
Member

Maybe a general config option like player name regex would be better, with a comment above it explaining it could be used for Geyser's prefix thing, because I'm not sure about adding a config option named after something we don't officially support (probably?)

@SaFiKiK
Copy link
Author

SaFiKiK commented Oct 30, 2021

player name regex would be better

That is true, but also, I forgot about the 2nd check for name length. Bedrock also allows for 16 char limit, but with a prefix added, nickname length can be 17. So if regex option will be implemented in the future, it will need another option player name length

@TPGamesNL
Copy link
Member

That is true, but also, I forgot about the 2nd check for name length. Bedrock also allows for 16 char limit, but with a prefix added, nickname length can be 17. So if regex option will be implemented in the future, it will need another option player name length

For that, we can just include the length check in the regex pattern

@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Oct 31, 2021
@TheLimeGlass TheLimeGlass removed the good first issue An issue that would be good for a first-time contributor to make a PR for label Jan 15, 2022
@TPGamesNL TPGamesNL added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

4 participants