新增一个UserCache快捷获取接口

新增getPlayerInfo接口,可以传入xuid/uuid/name快捷获取玩家信息
This commit is contained in:
子沐呀
2024-05-20 01:33:39 +08:00
Unverified
parent 10b8ab5b7f
commit b3946d7391
+4
View File
@@ -888,6 +888,10 @@ class UserCache {
return result == "" ? null : result;
}
static getPlayerInfo(playerIdentifier) {
return GMLIB_API.getAllPlayerInfo().find(Info => Object.keys(Info).some(InfoKey => Info[InfoKey] === playerIdentifier));
}
static getAllPlayerInfo() {
return GMLIB_API.getAllPlayerInfo();
}