Appearance
@loontail/minecraft-kit v0.8.14 / asPlayerUuid
Function: asPlayerUuid()
ts
function asPlayerUuid(raw): PlayerUuidValidate raw as a Minecraft player UUID and brand it as PlayerUuid. Throws MinecraftKitError(INVALID_INPUT) when the input is empty after trimming. The constructor does not enforce a specific UUID shape — Mojang accepts both dashed and undashed forms in different APIs — but it does reject the empty string so a missing storage entry can't quietly become a UUID-shaped placeholder.
Parameters
| Parameter | Type |
|---|---|
raw | string |
Returns
Example
ts
import { asPlayerUuid } from "@loontail/minecraft-kit";
const uuid = asPlayerUuid(await storage.load("player-uuid"));