Skip to content

Add helper methods for vanilla-style command feedback - #14331

Merged
Doc94 merged 22 commits into
PaperMC:mainfrom
Strokkur424:feat/command-feedback-helpers-2
Oct 22, 2026
Merged

Doc94 merged 22 commits into
PaperMC:mainfrom
Strokkur424:feat/command-feedback-helpers-2

Conversation

@Strokkur424

@Strokkur424 Strokkur424 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Supersedes #13058
Closes #12579

Changes over the original PR by jmp:

  • Updated to latest commit on main
  • Renamed sendSystemMessage to sendReply
  • Updated the sendSuccess Javadoc to replace deprecated GameRule mentions with GameRules
  • Introduced sendRichReply, sendRichSuccess, and sendRichFailure overloads, which accept MiniMessage and TagResolvers

@Override
default void sendFailure(final ComponentLike message) {
Preconditions.checkNotNull(message, "message cannot be null.");
this.getHandle().sendFailure(PaperAdventure.asVanilla(message.asComponent()), false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

well this comes from the base PR but not sure about ignore the default style used in vanilla, but its more a opinion... most of people who use this wanna custom messages so...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could theoretically just add an overload that does apply the style too. Maybe sendFailureStyled? Alternatively, could be a method parameter. Idk, whatever you think is best?

@Warriorrrr

Copy link
Copy Markdown
Member

didn't really give much time for jmp to look at your review there before opening your own PR there

I think sendSystemMessage would be a nicer name than sendReply or the old sendToTarget & the minimessage methods don't really seem necessary

@masmc05

masmc05 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

the minimessage methods don't really seem necessary

Minimessage methods are quite useful, including current ones on CommandSender, especially on just feedback as messages are often simple and defined in place in command handling

@Strokkur424

Copy link
Copy Markdown
Member Author

didn't really give much time for jmp to look at your review there before opening your own PR there

Just for your and anyone else's information, jmp did tell me I may open a PR to supersede his. I wouldn't have done it otherwise 😅

@Strokkur424

Copy link
Copy Markdown
Member Author

I think sendSystemMessage would be a nicer name than sendReply or the old sendToTarget & the minimessage methods don't really seem necessary

I can change it to sendSystemMessage again, sure, I thought maybe something shorter might be nice. Do you have any opinion on just calling it sendMessage directly, or is that too generic and may cause confusion between ctx.getSource().sendMessage() and ctx.getSource().getSender().sendMessage()?

The MiniMessage methods mirror the style of the ones on CommandSender, which I have found quite convenient. If you really think they should not be here, I can remove them again, but thought it might be a nice utility addition.

@Strokkur424
Strokkur424 requested a review from Doc94 October 3, 2026 20:04
@Doc94

Doc94 commented Oct 5, 2026

Copy link
Copy Markdown
Member

didn't really give much time for jmp to look at your review there before opening your own PR there

I think sendSystemMessage would be a nicer name than sendReply or the old sendToTarget & the minimessage methods don't really seem necessary

not sure about the SystemMessage term in methods... all the use of that are internally and exposed with simple names like sendRawMessage, etc.

For the MM i feel dont hurt have... we already has sendRichMessage

@Strokkur424
Strokkur424 requested a review from Doc94 October 5, 2026 21:38
@Strokkur424
Strokkur424 requested a review from jpenilla October 5, 2026 22:31
Strokkur424 and others added 2 commits October 6, 2026 00:46
Co-authored-by: Pedro <3602279+Doc94@users.noreply.github.com>
@Doc94
Doc94 dismissed jpenilla’s stale review October 21, 2026 21:50

Says its fine 👌

@Doc94
Doc94 removed the request for review from jpenilla October 21, 2026 23:00
@Doc94
Doc94 requested a review from lynxplay October 22, 2026 02:13
@papermc-projects papermc-projects Bot moved this from Delayed approval to Full approval in Paper PR Queue Oct 22, 2026
@Doc94
Doc94 merged commit 0db5c93 into PaperMC:main Oct 22, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Full approval to Merged in Paper PR Queue Oct 22, 2026
@Strokkur424
Strokkur424 deleted the feat/command-feedback-helpers-2 branch October 22, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

Paper/Minecraft Brigadier Command Feedback Parity

6 participants