TextLabelOptions
Defined in: server/api.d.ts:4458
A text label’s look and placement. Every key is optional; colours are 0xAARRGGBB numbers, “#RRGGBB[AA]” strings or Colors.
Properties
Section titled “Properties”align?
Section titled “align?”
optionalalign?:"left"|"center"|"right"
Defined in: server/api.d.ts:4537
How lines align with each other. Default “center”.
anchor?
Section titled “anchor?”
optionalanchor?:"center"|"bottom"|"top"
Defined in: server/api.d.ts:4542
Which part of the text block sits on the point. “bottom” grows upward, as a tag over a head.
attachTo?
Section titled “attachTo?”
optionalattachTo?:number|Entity|null
Defined in: server/api.d.ts:4477
Another live entity to follow, or its network id; null or 0 detaches. The label is destroyed with it.
background?
Section titled “background?”
optionalbackground?:boolean| {color?:string|number|Color;padding?:number;radius?:number; } |null
Defined in: server/api.d.ts:4532
A plate behind the text; true is translucent black, 4 px padding and radius.
color?
Section titled “color?”
optionalcolor?:string|number|Color
Defined in: server/api.d.ts:4507
Text colour. Default white.
drawDistance?
Section titled “drawDistance?”
optionaldrawDistance?:number
Defined in: server/api.d.ts:4557
World units; the label neither draws nor streams past it. Default 30 metres’ worth.
fadeDistance?
Section titled “fadeDistance?”
optionalfadeDistance?:number
Defined in: server/api.d.ts:4562
World units where fading starts; 0 starts at 75% of drawDistance.
fontSize?
Section titled “fontSize?”
optionalfontSize?:number
Defined in: server/api.d.ts:4487
Pixels, 1-512. Default 16.
lineSpacing?
Section titled “lineSpacing?”
optionallineSpacing?:number
Defined in: server/api.d.ts:4547
Line height as a multiple of the size. Default 1.
markup?
Section titled “markup?”
optionalmarkup?:boolean
Defined in: server/api.d.ts:4467
Parse inline tags: {#RRGGBB} / {#RRGGBBAA} colour, {#} back to color, {b}{/b}, {i}{/i}, {{ for a brace. Default false.
maxSize?
Section titled “maxSize?”
optionalmaxSize?:number
Defined in: server/api.d.ts:4502
World mode: never larger than this many pixels; 0 = no cap.
maxWidth?
Section titled “maxWidth?”
optionalmaxWidth?:number
Defined in: server/api.d.ts:4552
Wraps at spaces past this width, in fontSize pixels. 0 (default) never wraps.
minSize?
Section titled “minSize?”
optionalminSize?:number
Defined in: server/api.d.ts:4497
World mode: never smaller than this many pixels.
occlusion?
Section titled “occlusion?”
optionalocclusion?:boolean
Defined in: server/api.d.ts:4567
Hidden behind world geometry. Default true.
offset?
Section titled “offset?”
optionaloffset?:Vector3| {x:number;y:number;z:number; }
Defined in: server/api.d.ts:4482
Relative to the attached entity; the game decides the reference point (a player’s head, say).
opacity?
Section titled “opacity?”
optionalopacity?:number
Defined in: server/api.d.ts:4512
0-1, multiplies every colour. Default 1.
outline?
Section titled “outline?”
optionaloutline?:boolean| {color?:string|number|Color;width?:number; } |null
Defined in: server/api.d.ts:4522
true is 1 px black; width is at most 4.
position?
Section titled “position?”
optionalposition?:Vector3| {x:number;y:number;z:number; }
Defined in: server/api.d.ts:4472
Where the label stands while it is not attached, and returns to when detached.
shadow?
Section titled “shadow?”
optionalshadow?:boolean| {blur?:number;color?:string|number|Color;offsetX?:number;offsetY?:number; } |null
Defined in: server/api.d.ts:4527
A drop shadow; blur (at most 8) is approximated. Default a 1 px shadow.
sizeMode?
Section titled “sizeMode?”
optionalsizeMode?:"screen"|"world"
Defined in: server/api.d.ts:4492
“screen” (default): fontSize pixels at any distance. “world”: fontSize pixels at one metre on a 1080p view, shrinking with distance.
style?
Section titled “style?”
optionalstyle?:number|"none"|"shadow"|"outline"|"box"
Defined in: server/api.d.ts:4517
A preset for outline, shadow and background; blocks in the same call refine it.
optionaltext?:string
Defined in: server/api.d.ts:4462
UTF-8 text, at most 1024 bytes; ‘\n’ breaks lines.
virtualWorld?
Section titled “virtualWorld?”
optionalvirtualWorld?:number
Defined in: server/api.d.ts:4572
The virtual world it lives in while it is not attached, and returns to when detached.
