For the complete documentation index, see llms.txt. This page is also available as Markdown.

用户身份

该 UserIdentity 模块允许 场景 访问 资料 玩家用户的。

const UserIdentity = require("~system/UserIdentity");

它包含以下方法和类型:

方法

此模块中的两个方法从玩家用户获取部分信息。

getUserData

返回 UserData 玩家用户的。

interface Request {}

interface Response {
  // 用户的资料信息(如果可用)。
  data?: UserData;
}

function getUserData(Request): Promise<Response>;

类型

此模块中只有一种类型: UserData.

UserData

包含用户、其身份和头像的信息(可能不完整)。

World Explorers 可以通过 内容系统.

该 资料实体定义 详细说明了所有这些字段以及更多内容。虽然……的结构和键 UserData 略有不同,但每个字段的含义相同。

最后更新于