You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #848, there seems to be some desire to remove the common usage of audience.sendMessage(MiniMessage.miniMessage().deserialize("my string")) in favour of a shorthand method for this. The MiniMessageAudience proposed in that PR is nice, but fails to be generic enough to be useful.
I think providing a wrapper for ComponentLike that accepts a serializer and the data to be serialized (open for extensions such as additional MiniMessage tag resolvers or context objects) would be quite nice, allowing for a replacement of the common pattern above:
// Stored centrally somewhere.publicstaticMiniMessageStringmyMiniMessageString = MiniMessage.miniMessage().createString("my string", tagResolvers);
// Sent at a later date (optionally adding additional context).player.sendMessage(myMiniMessageString);
player.sendMessage(myMiniMessageString.withContext(player).withExtraTags(additionalTags));
The text was updated successfully, but these errors were encountered:
Related to #848, there seems to be some desire to remove the common usage of
audience.sendMessage(MiniMessage.miniMessage().deserialize("my string"))
in favour of a shorthand method for this. TheMiniMessageAudience
proposed in that PR is nice, but fails to be generic enough to be useful.I think providing a wrapper for
ComponentLike
that accepts a serializer and the data to be serialized (open for extensions such as additional MiniMessage tag resolvers or context objects) would be quite nice, allowing for a replacement of the common pattern above:The text was updated successfully, but these errors were encountered: