feat: add getPlayerInfo
新增一个UserCache快捷获取接口
This commit is contained in:
@@ -888,6 +888,10 @@ class UserCache {
|
|||||||
return result == "" ? null : result;
|
return result == "" ? null : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static getPlayerInfo(playerIdentifier) {
|
||||||
|
return GMLIB_API.getAllPlayerInfo().find(Info => Object.keys(Info).some(InfoKey => Info[InfoKey] === playerIdentifier));
|
||||||
|
}
|
||||||
|
|
||||||
static getAllPlayerInfo() {
|
static getAllPlayerInfo() {
|
||||||
return GMLIB_API.getAllPlayerInfo();
|
return GMLIB_API.getAllPlayerInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user