playerUUID
.playerUUID() is used to get the UUID of a player, this can be used to then getting information about that player.
.playerUUID(player)
Get the parsed UUID of a player.
Parameter
Type
Required
Description
player
string
true
The player to fetch the UUID of (player username)
Example:
const CubedCraft = require('cubed-api');
const player = 'PLAYER_NAME';
CubedCraft.utils.playerUUID(player).then(uuid => {
console.log(uuid);
})
.catch(error => {})
You need to catch errors because if the player doesn't exist it will return an error!
Last updated
Was this helpful?