name()
Get the player's current name.
It cannot be changed during runtime.
This is the name that the player defines.
Do not use this for logins
Function Definition
ts
public readonly name: string;
Returns
- string
Documentation
Examples
ts
const currentName = player.name;
console.log(currentName);