diff --git a/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/tag/resolver/Placeholder.java b/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/tag/resolver/Placeholder.java index fe45dccc2..a627e0412 100644 --- a/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/tag/resolver/Placeholder.java +++ b/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/tag/resolver/Placeholder.java @@ -25,6 +25,7 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.ComponentLike; +import net.kyori.adventure.text.format.StyleBuilderApplicable; import net.kyori.adventure.text.minimessage.tag.Tag; import org.jetbrains.annotations.NotNull; @@ -81,4 +82,18 @@ private Placeholder() { public static TagResolver.@NotNull Single component(final @NotNull String key, final @NotNull ComponentLike value) { return TagResolver.resolver(key, Tag.selfClosingInserting(value)); } + + /** + * Creates a style tag which will modify the style of the component. + * + *
This style can be used like other styles.
+ * + * @param key the key + * @param style the style + * @return the placeholder + * @since 4.13.0 + */ + public static TagResolver.@NotNull Single styling(final @NotNull String key, final @NotNull StyleBuilderApplicable@NotNull... style) { + return TagResolver.resolver(key, Tag.styling(style)); + } }