Class StandardTags


  • public final class StandardTags
    extends java.lang.Object
    Tag types distributed with MiniMessage.

    All built-in types are included in the default tag resolver.

    Since:
    4.10.0
    • Method Detail

      • decorations

        @NotNull
        public static @NotNull TagResolver decorations​(@NotNull
                                                       @NotNull TextDecoration decoration)
        Get a resolver for a specific text decoration.

        This tag supports both the standard names from TextDecoration.NAMES as well as a few aliases from DecorationTag.

        Parameters:
        decoration - the decoration to have a tag for
        Returns:
        a resolver for a certain decoration's tags
        Since:
        4.10.0
      • decorations

        @NotNull
        public static @NotNull TagResolver decorations()
        Get a resolver for all decoration tags.

        This tag supports both standard names from TextDecoration.NAMES as well as a few aliases from DecorationTag.

        Returns:
        a resolver for all decoration tags
        Since:
        4.10.0
      • color

        @NotNull
        public static @NotNull TagResolver color()
        Get a resolver for the "color" tags.

        This tag supports both hex string colors as well as named colors.

        Returns:
        a resolver for the "color" tags
        Since:
        4.10.0
      • hoverEvent

        @NotNull
        public static @NotNull TagResolver hoverEvent()
        Get a resolver for the "hover" tag.
        Returns:
        a resolver for the "hover" tag
        Since:
        4.10.0
      • clickEvent

        @NotNull
        public static @NotNull TagResolver clickEvent()
        Get a resolver for the "click" tag.
        Returns:
        a resolver for the "click" tag
        Since:
        4.10.0
      • keybind

        @NotNull
        public static @NotNull TagResolver keybind()
        Get a resolver for the "key" tag.
        Returns:
        a resolver for the "key" tag
        Since:
        4.10.0
      • translatable

        @NotNull
        public static @NotNull TagResolver translatable()
        Get a resolver for the "translate" tag.

        This tag also responds to "lang" and "tr".

        Returns:
        a resolver for the "translate" tag
        Since:
        4.10.0
      • translatableFallback

        @NotNull
        public static @NotNull TagResolver translatableFallback()
        Get a resolver for the "translate_or" tag.

        This tag also responds to "lang_or" and "tr_or".

        Returns:
        a resolver for the "translate_or" tag
        Since:
        4.13.0
      • insertion

        @NotNull
        public static @NotNull TagResolver insertion()
        Get a resolver for the "insert" tag.
        Returns:
        a resolver for the "insert" tag
        Since:
        4.10.0
      • font

        @NotNull
        public static @NotNull TagResolver font()
        Get a resolver for the "font" tag.
        Returns:
        a resolver for the "font" tag
        Since:
        4.10.0
      • gradient

        @NotNull
        public static @NotNull TagResolver gradient()
        Get a resolver for the "gradient" tag.
        Returns:
        a resolver for the "gradient" tag
        Since:
        4.10.0
      • rainbow

        @NotNull
        public static @NotNull TagResolver rainbow()
        Get a resolver for the "rainbow" tag.
        Returns:
        a resolver for the "rainbow" tag
        Since:
        4.10.0
      • reset

        @NotNull
        public static @NotNull TagResolver reset()
        Get a resolver for the "reset" tag.
        Returns:
        a resolver for the "reset" tag.
        Since:
        4.10.0
      • newline

        @NotNull
        public static @NotNull TagResolver newline()
        Get a resolver for the "newline" tag.

        This tag also responds to "br".

        Returns:
        a resolver for the "newline" tag.
        Since:
        4.10.0
      • selector

        @NotNull
        public static @NotNull TagResolver selector()
        Get a resolver for the "selector" tag.

        This tag also responds to "sel".

        Returns:
        a resolver for the "selector" tag
        Since:
        4.11.0
      • score

        @NotNull
        public static @NotNull TagResolver score()
        Get a resolver for the "score" tag.
        Returns:
        a resolver for the "score" tag
        Since:
        4.13.0
      • nbt

        @NotNull
        public static @NotNull TagResolver nbt()
        Get a resolver for the "nbt" tag.

        This tag also responds to "data".

        Returns:
        a resolver for the "nbt" tag.
        Since:
        4.13.0
      • defaults

        @NotNull
        public static @NotNull TagResolver defaults()
        Get a resolver that handles all default standard tags.

        This will currently return all standard tags, but in the future MiniMessage may add tags that are not enabled by default, and which must explicitly be opted-in to.

        Returns:
        the resolver for built-in tags
        Since:
        4.10.0