8000 MapArgument feature expansion by willkroboth · Pull Request #455 · CommandAPI/CommandAPI · GitHub
[go: up one dir, main page]

Skip to content

MapArgument feature expansion #455

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

Merged
merged 30 commits into from
Jun 9, 2023
Merged

MapArgument feature expansion #455

merged 30 commits into from
Jun 9, 2023

Conversation

willkroboth
Copy link
Collaborator
@willkroboth willkroboth commented Jun 5, 2023

The focus of this PR is to expand the features of the MapArgument. These include

  • Optional quoting for keys and values
  • No restriction on the characters that are allowed in a key (previously only letters, digits, and underscore)
  • String instead of char delimiters (so long delimiters like -> are possible) Nevermind, not doing that
  • Allow defining String separators between key-value pairs (instead of just space)
  • Suggestion handling for escape characters

This also generally recodes the internals of the MapArgument to use Brigadier's StringReader and merge logic shared between key and value processing. ArgumentMapTests had many (perhaps too many :P) tests added with the goal of 100% Jacoco coverage.

Copy link
Member
@DerEchtePilz DerEchtePilz left a comment

Choose a reason for hiding this comment

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

So, this were just points about the delimiter. To be able to submit another review (if necessary) I need to understand this first but that's on me :D

@willkroboth willkroboth requested a review from DerEchtePilz June 5, 2023 22:48
@willkroboth willkroboth requested a review from JorelAli June 8, 2023 11:07
willkroboth and others added 23 commits June 8, 2023 17:47
Reverse escape quotes at the start of unquoted strings
This case originally threw an unhelpful IndexOutOfBounds on MapArgument line 453
Copy link
Member
@JorelAli JorelAli left a comment

Choose a reason for hiding this comment

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

Great! I'm happy with the results. You're good to merge.
We need to make sure we don't forget to add a global changelog entry for this.

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.

3 participants
0