Appearance
@loontail/minecraft-kit v0.8.14 / offlineUuidFor
Function: offlineUuidFor()
ts
function offlineUuidFor(username): PlayerUuidDerive a stable v3-style UUID for an offline player username.
Mojang's offline-mode formula: MD5("OfflinePlayer:" + name) with the version/variant bits patched to UUID v3.
Parameters
| Parameter | Type |
|---|---|
username | string |
Returns
Example
ts
import { AuthModes, offlineUuidFor, type OfflineAuth } from "@loontail/minecraft-kit";
const username = "Notch";
const auth: OfflineAuth = { mode: AuthModes.OFFLINE, username, uuid: offlineUuidFor(username) };
// auth.uuid → "069a79f4-44e9-4726-a5be-fca90e38aaf5"