mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-31 03:50:36 +01:00
feat: add minimessage tag resolvers overload to CommandSender#sendMessage (#9505)
This commit is contained in:
parent
a218498234
commit
587085e41a
1 changed files with 13 additions and 0 deletions
|
@ -1963,6 +1963,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sends a message with the MiniMessage format to the command sender.
|
||||
+ * <p>
|
||||
+ * See <a href="https://docs.advntr.dev/minimessage/">MiniMessage docs</a> and <a href="https://docs.advntr.dev/minimessage/dynamic-replacements">MiniMessage Placeholders docs</a>
|
||||
+ * for more information on the format.
|
||||
+ *
|
||||
+ * @param message MiniMessage content
|
||||
+ * @param resolvers resolvers to use
|
||||
+ */
|
||||
+ default void sendRichMessage(final @NotNull String message, final net.kyori.adventure.text.minimessage.tag.resolver.@NotNull TagResolver... resolvers) {
|
||||
+ this.sendMessage(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(message, resolvers));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sends a plain message to the command sender.
|
||||
+ *
|
||||
+ * @param message plain message
|
||||
|
|
Loading…
Add table
Reference in a new issue