Tags
Every tag you can use, from plain MiniMessage to glyphs, faces and bolts.
Lightning understands four kinds of tags. You can mix all of them in the same line.
MiniMessage
Every standard MiniMessage tag works. Here are the ones you'll reach for most:
| Tag | Result |
|---|---|
<red>, <gold>, <#FFB347> | Colors |
<bold>, <italic>, <underlined>, <st>, <obf> | Decorations |
<gradient:#FFE259:#FFA751>text</gradient> | A gradient |
<rainbow>text</rainbow> | A rainbow |
<click:run_command:'/spawn'>text</click> | A click action |
<hover:show_text:'hi'>text</hover> | Hover text |
<newline> or <br> | A line break |
<head:Notch> | Someone's head, 1.21.9 or newer |
<sprite:block/stone> | Any block texture, 1.21.9 or newer |
The full list lives in the MiniMessage format reference.
Writing sprites
Sprites take the texture's path, like block/diamond_ore. Leave out minecraft:, because MiniMessage splits on colons and would read it as a different atlas. To use another atlas, name it first: <sprite:items:item/diamond>. Which atlases exist depends on the Minecraft version, so taste it with /lightning parse first.
Glyphs
Glyphs change how text looks. They keep every color and style inside them, so <sc><gradient:red:gold>Shop</gradient></sc> works perfectly.
| Tag | Result |
|---|---|
<smallcaps>text</smallcaps> or <sc> | ᴛᴇxᴛ |
<upper>text</upper> | TEXT |
<lower>TEXT</lower> | text |
<n> | A line break, the short way |
<center> | Centers the line it sits on |
<center:130> | Centers around a different point, handy for server list lines |
<clock> | The current time, as HH:mm |
<clock:'EEE dd MMM'> | The date or time in any Java date pattern |
<charge> | Does nothing on its own. It's the marker for marker mode |
Centering
<center> measures the line against Minecraft's default font, bold included, and pads it with spaces. It works per line, so you can center just the title of a longer message:
welcome: "<center><spark:name><n><center><gray>Welcome back, %player_name%<n><gray>Type /help to get started."Custom fonts land close, not exact
Custom fonts and resource pack glyphs can't be measured, so lines using them end up near the middle rather than exactly on it.
<clock> uses the time zone set in config.yml under timezone, like Europe/London. It's the server's own time zone by default.
Faces
Faces draw a player's head right inside the text. They need 1.21.9 or newer.
| Tag | Result |
|---|---|
<face> | The reader's own head |
<face:Steve> | Steve's head |
<face:flat> or <face:Steve:flat> | Without the hat layer |
header: "<face> <gray>Welcome, <white>%player_name%"Online players' faces carry their real skin, so they show up properly even on offline mode servers. A name that isn't online is looked up by the player's own game.
Faces don't cast a text shadow, which keeps them crisp in the tab list. If you'd like the shadow back, set faces.shadow: true in config.yml.
Older servers
Below 1.21.9, <face> shows faces.fallback from config.yml instead, a little gray smiley by default.
Bolts
Bolts are tags that do something besides showing text.
| Tag | What it does |
|---|---|
<actionbar> | Moves the whole message to the action bar instead of chat |
<actionbar:'text'> | Shows extra text on the action bar, and the message stays in chat |
<title> | Moves the whole message to the title |
<title:'main'> | Shows a title, and the message stays in chat |
<title:'main':'sub'> | A title with a subtitle |
<title:'main':'sub':10:70:20> | The same, with fade in, stay and fade out in ticks |
<sound:entity.player.levelup> | Plays a sound to the reader |
<sound:block.note_block.pling:0.6:1.4> | A sound with volume and pitch |
<silent> | Hides the message, while other bolts in it still fire |
# plays a sound and shows the reward on the action bar, chat stays tidy
reward: "<silent><sound:entity.player.levelup><actionbar:'<gold>+250 coins'>"
# a plugin's plain "Home set." message becomes an action bar
home-set: "<actionbar><green>Home set."Bolts only fire in chat
Bolts only work on the chat surface. Anywhere else they quietly disappear. The tab list, for example, resends the same text every few ticks, and you really don't want a sound playing on every one of them.
Last updated on