Layout & Positioning

Bracket tags placed at the top of your markup string configure where the message sits on screen and how it looks. They apply to the whole message, not to individual spans.

The anchor is the screen point the message positions itself relative to. There are nine options arranged as a 3x3 grid:

TOP_LEFT TOP_CENTER TOP_RIGHT
MIDDLE_LEFT MIDDLE MIDDLE_RIGHT
BOTTOM_LEFT BOTTOM_CENTER BOTTOM_RIGHT

Bracket tag: [anchor value=TOP_CENTER]

Default: TOP_CENTER

The anchor maps to a fraction of the screen: TOP_LEFT is (0, 0), MIDDLE is (0.5, 0.5), BOTTOM_RIGHT is (1.0, 1.0). The message is then shifted by the offset (see below) from that point.

[anchor value=MIDDLE]
Welcome back!

[offset x=N y=N] shifts the message from its anchor position, in pixels at GUI scale 1.

Default: x=0, y=55

Positive x moves right, negative moves left. Positive y moves down, negative moves up (standard 2D screen space). The renderer clamps the final position to a 4-pixel margin inside the screen edge so text can’t be pushed entirely off screen.

[anchor value=TOP_CENTER][offset x=0 y=80]
Deeper below the top

The 55-pixel default y-offset exists so a TOP_CENTER message clears the hotbar and health display area at typical GUI scales.

[scale value=N] multiplies the text size. N is a float.

Default: 1.0

Scale is applied in the HUD coordinate system after GUI scale, so [scale value=2.0] renders at twice the normal HUD text size regardless of the player’s GUI scale setting. It also scales the background box if one is enabled.

[scale value=1.5]
Slightly larger text

[align value=X] controls how multi-line or width-varying text aligns horizontally within its bounding box.

Default (field): CENTER

The [align] tag defaults to LEFT when no value is given. Accepted values:

ValueEffect
LEFTtext starts at the anchor x position
CENTERtext is centered around the anchor x position
RIGHTtext ends at the anchor x position
[anchor value=MIDDLE][align value=CENTER]
Centered on screen

[bg] and [background] are interchangeable. With no attributes they enable a solid dark background with the default color (#AA000000).

Solid background:

[bg color=#AA000000]
Dark box behind this text

Background gradient:

Use from and to with two color values, or the shorthand gradient=from,to:

[bg from=#AA000000 to=#AA0000FF]
Fades from black to dark blue
[bg gradient=#AA000000,#AA0000FF]
Same thing, shorthand form

Border colors:

The border is a gradient along the left and right edges. bordercolor sets both ends to the same color; borderstart and borderend set them independently:

[bg color=#AA000000 bordercolor=#AAFFFFFF]
Dark fill, white border
[bg color=#AA000000 borderstart=#AAFF0000 borderend=#AA0000FF]
Dark fill, red-to-blue border

You can combine a background gradient with border colors in one tag:

[bg from=#AA000000 to=#AA001133 borderstart=#AAFF8800 borderend=#AA4400AA]

Default border values: borderStart #AAFFFFFF, borderEnd #AA000000. These are always present; if you enable a background without setting borders you’ll see a subtle light-to-dark edge.

Immersive message with a dark translucent background panel and subtle border gradient

[shadow value=true|false] controls whether the text drop shadow is drawn.

Default: true

[shadow value=false]
No drop shadow

Disabling shadow can improve legibility on some backgrounds and makes the text appear slightly thinner.

[fade in=N out=N] sets the fade-in and fade-out durations in ticks. Both are optional; omitting one leaves the other unchanged.

Default: in=0, out=0 (no fade)

[fade in=10 out=20]
Fades in over half a second, out over one second

20 ticks = 1 second. Fade is handled separately from duration: a message with in=10 out=20 and a duration of 100 has a total lifetime of 130 ticks.