Nametags
constNametags:object
Defined in: client/api.d.ts:2808
The local player’s view of the nametags above other players: whether they draw at all, and whether they carry a health bar.
Type Declaration
Section titled “Type Declaration”isHealthVisible()
Section titled “isHealthVisible()”isHealthVisible():
boolean
Checks whether this player draws health bars on nametags.
Returns
Section titled “Returns”boolean
True unless they were hidden locally.
isVisible()
Section titled “isVisible()”isVisible():
boolean
Checks whether this player draws nametags.
Returns
Section titled “Returns”boolean
True unless they were hidden locally.
setHealthVisible()
Section titled “setHealthVisible()”setHealthVisible(
visible):void
Shows or hides the health bar on all nametags for this player only, leaving the names alone.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
True to draw the health bar under each name, false to hide it.
Returns
Section titled “Returns”void
setVisible()
Section titled “setVisible()”setVisible(
visible):void
Shows or hides all nametags for this player only. A player hidden with Player.setNametagVisible stays hidden either way.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
True to draw nametags, false to hide every one of them.
Returns
Section titled “Returns”void
