Skip to content

Text formatting

GreatNPC supports a lightweight MiniMessage-style parser for custom NPC text, including dialogue and configured battle messages. This is separate from Minecraft's native language-file format.

Supported formatting

Feature Example
Named color <gold>Welcome!</gold>
Hex color <#52b9ff>Hello</#52b9ff>
Bold <bold>Gym Leader</bold> or <b>Gym Leader</b>
Italic <italic>Good luck.</italic>
Underline <underlined>Important</underlined>
Strikethrough <strikethrough>Sold out</strikethrough>
Obfuscated <obfuscated>Secret</obfuscated>
Gradient <gradient:#52b9ff:#ffd166>Champion</gradient>
Rainbow <rainbow>Festival</rainbow>
Newline <newline> or <br>
Reset <reset>

Negated decorations such as <!italic> are accepted. The parser also recognizes legacy color/decoration codes with & or §, including &#RRGGBB.

This is not the full Adventure MiniMessage library. Do not assume that click, hover, font, selector, NBT, or arbitrary tag resolvers are supported.

Example

{
  "intro_message": "<gold>Welcome, %player%!</gold><newline>Ready to face %trainer%?"
}

A JSON \n becomes a line break after JSON decoding. The parser also handles a literal backslash-n sequence. To show a literal opening angle bracket, escape it with a backslash; JSON requires a second backslash to represent that escape.

Placeholders

Configured battle messages support %player% and %trainer%. Action/dialogue text supports its own context substitution; see Placeholders.

Resource-pack translations

Do not put MiniMessage tags into a standard language JSON value expecting every vanilla translatable component to parse them. Use normal Minecraft translation strings and %1$s-style arguments. See Resource packs and translation.