Skip to content

feat(key): tryParse methods#1394

Open
RedVortexDev wants to merge 2 commits into
PaperMC:main/5from
RedVortexDev:feat/tryparse-key-methods
Open

feat(key): tryParse methods#1394
RedVortexDev wants to merge 2 commits into
PaperMC:main/5from
RedVortexDev:feat/tryparse-key-methods

Conversation

@RedVortexDev
Copy link
Copy Markdown

This pull request adds tryParse equivalents for the key methods, this both solves the issue of needing to suppress PatternValidation every time and allows for providing a default value in case parsing fails, while still forcing developers to properly handle invalid keys whether by checking #ifPresent or explicitly using #getOrThrow.

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.

1 participant