BasePlayer
Defined in: client/api.d.ts:5535
Framework-owned base handle for a connected player, extended by each game or mod.
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BasePlayer(
id):BasePlayer
Defined in: client/api.d.ts:5540
Creates a wrapper for an existing connected player with this ID; it does not connect or spawn a player.
Parameters
Section titled “Parameters”number
Network entity identifier.
Returns
Section titled “Returns”BasePlayer
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”getNametagColor()
Section titled “getNametagColor()”getNametagColor():
number
Defined in: client/api.d.ts:5570
Reads this player’s nametag color.
Returns
Section titled “Returns”number
Packed 0xAARRGGBB color; opaque white when untinted.
getNametagText()
Section titled “getNametagText()”getNametagText():
string
Defined in: client/api.d.ts:5564
Reads this player’s nametag text override.
Returns
Section titled “Returns”string
The override, or an empty string when the player’s own name is drawn.
isNametagHealthVisible()
Section titled “isNametagHealthVisible()”isNametagHealthVisible():
boolean
Defined in: client/api.d.ts:5558
Checks whether the health bar under this player’s nametag is shown.
Returns
Section titled “Returns”boolean
True unless the health bar was hidden; false also when this game has no nametags.
isNametagVisible()
Section titled “isNametagVisible()”isNametagVisible():
boolean
Defined in: client/api.d.ts:5552
Checks whether this player’s nametag is shown to other players.
Returns
Section titled “Returns”boolean
True unless the nametag was hidden; false also when this game has no nametags.
toString()
Section titled “toString()”toString():
string
Defined in: client/api.d.ts:5546
Formats this player handle for logging and debugging.
Returns
Section titled “Returns”string
Text containing the player’s network entity ID.
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”
readonlyid:number
Defined in: client/api.d.ts:5462
Immutable network entity identifier.
Inherited from
Section titled “Inherited from”position
Section titled “position”position:
Vector3
Defined in: client/api.d.ts:5472
Authoritative world-space position; assignment forces replicated state.
Inherited from
Section titled “Inherited from”rotation
Section titled “rotation”rotation:
Vector3|Quaternion
Defined in: client/api.d.ts:5477
Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.
Inherited from
Section titled “Inherited from”
readonlystate:StateBag
Defined in: client/api.d.ts:5482
Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.
Inherited from
Section titled “Inherited from”virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: client/api.d.ts:5467
Current virtual-world identifier.