Skip to content

feature(minimessage): Add tag resolver type hints - #1444

Open
flennium wants to merge 1 commit into
PaperMC:main/5from
flennium:agent/1424-tag-resolver-type-hints
Open

feature(minimessage): Add tag resolver type hints#1444
flennium wants to merge 1 commit into
PaperMC:main/5from
flennium:agent/1424-tag-resolver-type-hints

Conversation

@flennium

@flennium flennium commented Aug 8, 2026

Copy link
Copy Markdown

Fixes #1424

Summary

MiniMessage currently resolves ordinary tags during both the preprocessing and normal parsing passes. This adds an additive TagResolver#tagType(String) hint so resolvers can identify known non-PreProcess tags and avoid the unnecessary preprocessing resolution.

Existing resolvers that do not provide the hint retain the previous behavior. Built-in single-tag, mapped, cached, and composed resolvers propagate available type information.

Testing

  • Added resolver call-count regression tests.
  • Verified legacy resolvers remain at two calls.
  • Verified hinted ordinary tags resolve once.
  • Verified hinted PreProcess tags still resolve during preprocessing.
  • ./gradlew :adventure-text-minimessage:check --rerun
  • ./gradlew check --rerun

@flennium
flennium marked this pull request as ready for review August 8, 2026 21:36
@flennium
flennium force-pushed the agent/1424-tag-resolver-type-hints branch from ca8b467 to 2286bd8 Compare August 10, 2026 21:51
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.

Tag resolvers should hint at tag type to avoid multiple calls

1 participant