MiniMessage Studio
Type MiniMessage and see it as Minecraft chat, convert old & color codes, and copy the Java code.
Type a message with MiniMessage tags and watch it appear the way players will see it: in chat, as a big title, in the action bar or as an item name. Then copy the Java line that sends it from your plugin.
What MiniMessage is
Minecraft text can have colors, bold letters, links you can click and tooltips that pop up when you point at them. In a Paper plugin you describe all of that with MiniMessage: plain text with small tags in angle brackets, a bit like HTML on a web page.
1<gray>[<green>+</green>] Steve2<gold>Welcome to the server, <bold>Steve</bold>!Welcome to the server, Steve!
- An opening tag like
<gold>switches a style on. Everything after it is gold. - A closing tag with a slash, like
</bold>, switches it off again. You may leave closing tags out at the end of a line: the line ends anyway. - Some tags take extra values after a colon, like
<click:run_command:/spawn>or<gradient:red:blue>.
Your plugin sends this text with one line of Java, player.sendRichMessage("..."). Paper turns the tags into a component, the text object Minecraft really sends to the player.
The studio
Pick an example or type your own text on the left. The preview on the right updates while you type. Point at underlined or colored parts in the preview to see their hover text and what a click would do.
The MiniMessage Studio is loading. If this message stays, JavaScript is turned off in your browser.
How to use it in your plugin
Design the text here
Try colors and tags until the preview looks right. Choose Chat, Title, Action bar or Item name above the preview, because each place uses different Java.
Copy the Java
Press Copy Java. You get the import lines and the code. The code needs a
playervariable: aPlayerobject that says who gets the text.Paste it where you have a player
Most of the time that is inside an event handler, such as
onJoinin a listener, or inside a command. Open Where does this code go? under the code to see a complete listener you can copy.Fix the imports
If IntelliJ underlines a name in red, click it and press Alt+Enter, then choose Import class. That adds the import line for you.
The MiniMessage tab gives you the short form with tags. The Component builder tab shows the same chat text built with Java objects like Component.text("Hi", NamedTextColor.GREEN). Both send exactly the same thing to the player. Most plugins use tags because they are shorter and can be moved into a config file later.
Mistakes beginners make
- Using & codes. Old tutorials write
&aHello. MiniMessage does not read those legacy codes: they show up as plain text. Paste such text into the converter below the studio to turn it into tags. - Italic item names. Minecraft draws custom item names and lore in italic. Start each line with
<!i>to get straight letters. The Item name preview shows this exactly like the game. - Quotes inside hover text. Put hover text in single quotes:
<hover:show_text:'<red>Hi'>. If the text itself contains a single quote, use double quotes around it instead. - Typos in tag names. A tag MiniMessage does not know, like
<underline>instead of<underlined>, is printed as normal text. The studio marks unknown tags in red and explains them under the editor. - Player names and chat in your messages. Never glue text that a player typed straight into a MiniMessage string, or players can add their own tags. Use placeholders instead, as shown in MiniMessage: easy formatted text.
- Showing a tag as text. To show the characters
<red>without coloring anything, put a backslash in front:\<red>. This is called escaping. In Java code the backslash itself must be doubled, so the studio copies it as"\\<red>".
Next steps
- MiniMessage: easy formatted text explains every tag, placeholders and messages in config files.
- Events and listeners shows where code that sends messages lives.