Format
The MiniMessage language uses tags. Everything you do will be defined with tags. Tags have a start tag and an end tag (the <reset> tag is an exception here).
Start tags are mandatory (obviously), but end tags aren’t outside of strict mode. The following are all visually identical:
<yellow>Hello <blue>World<yellow>!<yellow>Hello <blue>World</blue>!<yellow>Hello </yellow><blue>World</blue><yellow>!</yellow>For tags with no content, tags can be auto-closed by using the format <tag/>. With this format, even in strict mode no separate closing tag should be provided.
All tag names are case-insensitive to reduce the possibility for conflict, but we recommend keeping all tag names lowercase (or at the very least, being consistent).
Some tags have argument. Those look like this: <tag:argument>stuff</tag>.
For example:
<hover:show_text:"<red>test:TEST">TEST<click:run_command:test>TESTAs you can see, those sometimes contain components, sometimes just numbers, strings, or other types. Refer to the detailed docs below.
Single (') and double (") quotes can be used interchangeably. We recommend staying consistent, though in order to minimize escaping it might make more sense to switch quote types for some arguments.
Any meaningful token can be escaped in the locations where they have influence. In plain text, tag open characters (<) can be escaped with a leading backslash (\). Within quoted strings,
the opening quote character can be escaped (' or "). In either place, the escape character can be escaped in places where it would otherwise be relevant. Unquoted tag arguments cannot have escapes, for simplicity.
In locations where escaping is not supported, the literal escape character will be passed through. In locations where escaping is supported but a literal escape character is desired, the escape character can itself be escaped to produce a \.
The default tags try to represent components in a manner compatible with Vanilla, but simplifying some elements. It might be helpful to use the Minecraft wiki as a reference for the Vanilla component system, especially for things like the actions and values of click and hover events.
The MiniMessage Web Viewer allows testing MiniMessage text locally, without having to spin up a Minecraft instance. It can be helpful to put examples from these docs into the viewer while learning.
Strict mode
Section titled “Strict mode”By default, MiniMessage is extremely lenient, and any invalid tags will just be ignored. Any tags left unclosed at the end of an input string will be automatically closed.
Applications can optionally enable strict mode, which prohibits using <reset>, and requires all tags to be closed in reverse order of opening. Any application
using MiniMessage should make it clear to end users which language variant is being used.
Standard tags
Section titled “Standard tags”These are the tags included and enabled by default in MiniMessage. Specific parses of MiniMessage may add custom tags to this list, or restrict the available tags to a subset of this list. Consult application documentation for details.
Color the next parts
Tag
<_colorname_>
Arguments
-
_colorname_, any minecraft color constant:black,dark_blue,dark_green,dark_aqua,dark_red,dark_purple,gold,gray,dark_gray,blue,green,aqua,red,light_purple,yellow, orwhite.dark_greycan be used in place ofdark_gray, and so cangreyin place ofgray. Hex colors are supported as well, with the format#RRGGBB.
Examples
<yellow>Hello <blue>World</blue>!<red>This is a <green>test!<#00ff00>R G B!Color (verbose)
Section titled “Color (verbose)”A more verbose way of defining colors
Tag
<color:_colorNameOrHex_>
Aliases
colour,c
Arguments
_colorNameOrHex_, can be any of the values from above (so named colors or hex colors)
Examples
<color:yellow>Hello <color:blue>World</color:blue>!<color:#FF5555>This is a <color:#55FF55>test!Shadow Color
Section titled “Shadow Color”Color the shadow of the next parts
Tag
<shadow:_colorNameOrHex_:[alpha_as_float]><!shadow>as an alias to disable the shadow (equivalent to<shadow:#00000000>)
Arguments
_colorNameOrHex_, a named color or hex color string with the format#RRGGBBor#RRGGBBAA[alpha_as_float], a float value between 0 and 1, representing the alpha value of the shadow. Optional, defaults to 0.25. Has no effect if an alpha value is already provided in the hex color string.
Examples
<shadow:yellow>Hello <shadow:aqua:0.5>World</shadow>!<shadow:#FF5555>This is a <shadow:#55FF55>test!<shadow:#000000FF><b>Thicc
Decoration
Section titled “Decoration”Decorate the next parts
Tag
<_decorationname_[:false]>, or<!_decorationname_>as an alias to invert the decoration.
Arguments
_decorationname_, Any decoration supported in Minecraft:
| Decoration | Aliases |
|---|---|
bold | b |
italic | em or i |
underlined | u |
strikethrough | st |
obfuscated | obf |
Examples
<underlined>This is <bold>important</bold>!Close all currently open tags, resetting color/decoration/etc. The reset tag cannot be closed.
In strict mode, reset tags are forbidden.
Tag
<reset>
Arguments
- none
Examples
<yellow><bold>Hello <reset>world!Allows doing multiple things when clicking on the component.
Tag
<click:_action_:_value_>
Arguments
_action_, the type of click event, one of this list_value_, the argument for that particular event, refer to the minecraft wiki
Examples
<click:run_command:/seed>Click</click> to show the world seed!Click <click:copy_to_clipboard:Haha you suck> this </click>to copy your score!Allows doing multiple things when hovering on the component.
Tag
<hover:_action_:_value..._>
Arguments
_action_, the type of hover event, one of this list_value..._, arguments specific to each event action:
| Action | Value |
|---|---|
show_text | _text_ (a MiniMessage string) |
show_item | _type_[:_count_[:tag]] (a Key for the item’s type, optionally followed by count (an integer) and tag (a SNBT string)) |
show_entity | _type_:_uuid_[:_name_] (a Key ID of the entity type, the entity’s UUID, and an optional custom name) |
Examples
<hover:show_text:'<red>test'>TESTKeybind
Section titled “Keybind”Allows displaying the configured key for actions
Tag
<key:_key_>
Arguments
_key_, the keybind identifier of the action
Examples
Press <red><key:key.jump> to jump!Translatable
Section titled “Translatable”Allows displaying minecraft messages using the player locale
Tag
<lang:_key_:_value1_:_value2_...>
Aliases
tr,translate
Arguments
_key_, the translation key_valueX_, optional values that are used for placeholders in the key (they will end up in thewithtag in the JSON)
Examples
You should get a <lang:block.minecraft.diamond_block>!<lang:commands.drop.success.single:'<red>1':'<blue>Stone'>!Fallback
Section titled “Fallback”Allows displaying minecraft messages using the player locale, or a fallback if no text is available
Tag
<lang_or:_key_:_fallback_:_value1_:_value2_...>
Aliases
tr_or,translate_or
Arguments
_key_, the translation key_fallback_, the fallback text to display_valueX_, optional values that are used for placeholders in the key (they will end up in thewithtag in the JSON)
Examples
You should get a <lang_or:block.minecraft.diamond_block:'Dirt Block'>!Insertion
Section titled “Insertion”Allow insertion of text into chat via shift click
Tag
<insert:_text_>
Arguments
_text_, the text to insert
Examples
Shift-click <insert:test>this</insert> to insert!
Rainbow
Section titled “Rainbow”Rainbow-colored text?!
Tag
<rainbow:[!][phase]>
Arguments
- phase, optional
!, literal value which reverses the rainbow, optional
Examples
<yellow>Woo: <rainbow>||||||||||||||||||||||||</rainbow>!<yellow>Woo: <rainbow:!>||||||||||||||||||||||||</rainbow>!<yellow>Woo: <rainbow:2>||||||||||||||||||||||||</rainbow>!<yellow>Woo: <rainbow:!2>||||||||||||||||||||||||</rainbow>!
Gradient
Section titled “Gradient”Gradient colored text
Tag
<gradient:[color1]:[color...]:[phase]>
Arguments
- a list of 1 to n colors, either hex or named colors and an optional phase parameter (range -1 to 1) allows you to shift the gradient around, creating animations.
Examples
<yellow>Woo: <gradient>||||||||||||||||||||||||</gradient>!<yellow>Woo: <gradient:#5e4fa2:#f79459>||||||||||||||||||||||||</gradient>!<yellow>Woo: <gradient:#5e4fa2:#f79459:red>||||||||||||||||||||||||</gradient>!<yellow>Woo: <gradient:green:blue>||||||||||||||||||||||||</gradient>!
Transition
Section titled “Transition”Transitions between colors. Similar to a gradient, but everything is the same color and the phase chooses that color
Tag
<transition:[color1]:[color...]:[phase]>Arguments- a list of 1 to n colors, either hex or named colors and an optional phase parameter (range -1 to 1) allows you to shift the transition around, creating animations. Examples
<transition:#00ff00:#ff0000:0>|||||||||</transition><transition:white:black:red:[phase]>Hello world [phase]</transition>
Allows to change the font of the text
Tag
<font:key>
Arguments
- the namespaced key of the font, defaulting to
minecraft
Examples
Nothing <font:uniform>Uniform <font:alt>Alt </font> Uniform<font:myfont:custom_font>Uses a custom font from a resource pack</font>Newline
Section titled “Newline”Insert a newline character.
Tag
<newline>
Aliases
br
Arguments
- none
Examples
Let me insert a <newline>line break here.<hover:show_text:'<red>Hover with a<newline><green>line break'>Text with<newline>line break</hover>
Selector
Section titled “Selector”(since v4.11.0) Insert a selector component
Tag
<selector:_sel_[:_separator_]>
Aliases
sel
Arguments
_sel_, the selector pattern to insert_separator_(optional), the separator to insert between values the selector matches
Examples
Hello <selector:@e[limit=5]>, I'm <selector:@s>!
(since v4.13.0) Insert a score component.
Tag
<score:_name_:_objective_>
Arguments:
_name_, the name of the score holder on the server scoreboard, or a selector resolved with receiver context_objective_, the name of the objective to getname’s score in
Examples
You have won <score:rymiel:gamesWon/> games!(since v4.13.0) Insert a NBT component. The syntax of this tag is intended to be familiar to users of vanilla Minecraft’s /data command.
Tag
<nbt:block|entity|storage:id:path[:_separator_][:interpret]>
Aliases
data
Arguments:
block|entity|storagethe type of data source to read from — ablockentity, anentityselector, or the persistent commandstoragecontainer_id_, the position for a block NBT component, a selector for an entity NBT component, or a key (resource location) for a storage NBT component_path_, the NBT path to resolve from within the data source_separator_, the separator between multiple values, if (primarily for entity NBT) the data source returns more than oneinterpret, the literal textinterpretif the result should be parsed as component JSON
Examples
Your health is <nbt:entity:'@s':Health/>(since v4.18.0) Colors the text inside the tags with a gradient corresponding to a pride flag.
Tag
<pride[:flag|phase]>
Arguments
flagthe flag to use, may be one of pride, progress, trans, bi, pan, nb, lesbian, ace, agender, demisexual, genderqueer, genderfluid, intersex, aro, baker, philly, queer, gay, bigender or demigender.phasephase, a number between -1 and 1, optional
Examples
Happy <pride>pride month</pride>!Kyori supports <pride:trans>trans rights</pride>!Sprite
Section titled “Sprite”(since v4.25.0) Inserts a sprite.
Tag
<sprite[:atlas]:sprite>
Arguments
atlasthe atlas to use, e.g.minecraft:blocks.spritethe sprite to use, e.g.item/emerald.
Examples
Look at my <sprite:blocks:block/stone>!This item costs 10 x <sprite:"minecraft:items":item/porkchop>.(since v4.25.0) Inserts a player head.
Tag
<head:name|uuid|texture[:outer_layer]>
Arguments
name|uuid|texturethe name, UUID or path to the texture of the skin to use to draw the head.outer_layereithertrueorfalse, determines if the outer layer (or “hat” layer) should be drawn. Defaults totrue.
Examples
My favorite dev is <head:1f085b2d-9548-4159-a8c7-f3ccdf0c2054>.Do you prefer <head:entity/player/wide/steve> Steve or <head:entity/player/slim/alex> Alex?Thanks <head:Strokkur24:false> for the docs!