Skip to content

chore: clean up captions#550

Merged
Citymonstret merged 11 commits into2.0.0-devfrom
chore/2.0.0/caption-cleanup
Dec 10, 2023
Merged

chore: clean up captions#550
Citymonstret merged 11 commits into2.0.0-devfrom
chore/2.0.0/caption-cleanup

Conversation

@Citymonstret
Copy link
Copy Markdown
Member

@Citymonstret Citymonstret commented Dec 7, 2023

  • The final Caption class has been turned into an interface with an immutable implementation
  • The final CaptionVariable class has been turned into an interface with an immutable implementation
  • CaptionVariableReplacementHandler has been turned into a generic CaptionFormatter which can output generic types instead of just strings
  • The different classes have had their javadoc updates and the accessor prefixes are gone
  • CommandContext and ParserException now have new formatting methods that take in a formatter
  • The placeholder format has changed from {placeholder} to <placeholder>. A lot of people pass these directly to MiniMessage so we might as well make that process a bit easier :)
  • CaptionRegistry has been merged with the factory delegating version, and you now register providers without specifying the caption. This means that you can catch all requests at once. Missing values will fallback onto earlier providers. There are static factory methods in CaptionProvider that allow you to register per-faction providers.

- The final `Caption` class has been turned into an interface with an immutable implementation
- The final `CaptionVariable` class has been turned into an interface with an immutable implementation
- `CaptionVariableReplacementHandler` has been turned into a generic `CaptionFormatter` which can output generic types instead of just strings
- The different classes have had their javadoc updates and the accessor prefixes are gone
- `CommandContext` and `ParserException` now have new formatting methods that take in a formatter
- The placeholder format has changed from `{placeholder}` to `<placeholder>`
@Citymonstret Citymonstret added this to the 2.0.0 milestone Dec 7, 2023
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 7, 2023

Test Results

  77 files  +  2    77 suites  +2   14s ⏱️ -7s
481 tests +17  481 ✔️ +17  0 💤 ±0  0 ±0 
508 runs  +32  508 ✔️ +32  0 💤 ±0  0 ±0 

Results for commit 6964e5e. ± Comparison against base commit 36c18ff.

♻️ This comment has been updated with latest results.

@Citymonstret Citymonstret marked this pull request as ready for review December 9, 2023 07:42
@Citymonstret Citymonstret merged commit 05d6847 into 2.0.0-dev Dec 10, 2023
@Citymonstret Citymonstret deleted the chore/2.0.0/caption-cleanup branch December 10, 2023 10:39
@Citymonstret Citymonstret mentioned this pull request Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant