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

🛠 Change player parsing to use name starting with #5875

Merged

Conversation

AyhamAl-Ali
Copy link
Member

@AyhamAl-Ali AyhamAl-Ali commented Aug 2, 2023

Description

Based on this discord message and this and the related issue, it's better to use name starting with instead of name contains for accuracy and expected results. I had to kind-of use getPlayer method's code instead of the method itself to allow 'multiple players starting with name X' error to trigger

Old behavior: (contains)
"SkriptDev" parsed as player # SkriptDev
"s" parsed as player # SkriptDev
"t" parsed as player # SkriptDev
"y" parsed as player # none
New Behavior: (starts with)
"SkriptDev" parsed as player # SkriptDev
"s" parsed as player # SkriptDev
"t" parsed as player # none
"y" parsed as player # none


Target Minecraft Versions:
Requirements:
Related Issues:

@AyhamAl-Ali AyhamAl-Ali added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Aug 2, 2023
@TheLimeGlass TheLimeGlass added the breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) label Aug 3, 2023
@AyhamAl-Ali AyhamAl-Ali changed the base branch from master to dev/feature September 21, 2023 18:12
@AyhamAl-Ali AyhamAl-Ali added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Oct 5, 2023
@sovdeeth sovdeeth added the 2.8 Targeting a 2.8.X version release label Dec 30, 2023
@sovdeeth sovdeeth merged commit 293727f into SkriptLang:dev/feature Jan 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8 Targeting a 2.8.X version release breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) enhancement Feature request, an issue about something that could be improved, or a PR improving something. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants