Repository navigation
Add helper methods for vanilla-style command feedback - #14331
Conversation
| @Override | ||
| default void sendFailure(final ComponentLike message) { | ||
| Preconditions.checkNotNull(message, "message cannot be null."); | ||
| this.getHandle().sendFailure(PaperAdventure.asVanilla(message.asComponent()), false); |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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?
|
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 |
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 |
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 😅 |
I can change it to The MiniMessage methods mirror the style of the ones on |
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 |
Co-authored-by: Pedro <3602279+Doc94@users.noreply.github.com>
Supersedes #13058
Closes #12579
Changes over the original PR by jmp:
sendSystemMessagetosendReplysendSuccessJavadoc to replace deprecatedGameRulementions withGameRulessendRichReply,sendRichSuccess, andsendRichFailureoverloads, which accept MiniMessage and TagResolvers