PlayerObject holds information about a player.


PlayerObject holds information about a player.

Name Type Description
id number

The id of the player, each player that joins the room gets a unique id that will never change.

name string

The name of the player.

team number

The team of the player.

admin boolean

Whether the player has admin rights.

position Object.<number, number>

The player's position in the field, if the player is not in the field the value will be null.

Name Type Description
x number

X coordinate of the position

y number

Y coordinate of the position

auth string

The player's public ID. Can be null if the ID validation fails. This property is only set in the external:native-api.RoomObject.onPlayerJoin event.

conn string