fix: fix shit

This commit is contained in:
n15421
2025-06-05 16:20:14 +08:00
Unverified
parent 54096c84ca
commit c81bd7a517
3 changed files with 35 additions and 17 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "${pluginName}",
"entry": "${pluginFile}",
"version": "1.1.1",
"version": "1.1.2",
"author": "GroupMountain",
"type": "native",
"passive": true,
+26 -8
View File
@@ -188,8 +188,9 @@ void Export_Compatibility_API() {
RemoteCall::exportAs(
"GMLIB_API",
"updateOrCreateLanguageFile",
[](std::string const& code, std::unordered_map<std::string, std::string> lang, std::string const& path
) -> void {
[](std::string const& code,
std::unordered_map<std::string, std::string> lang,
std::string const& path) -> void {
if (GMLevel::getInstance()) {
I18nAPI::updateOrCreateLanguageFile(path, code, lang);
}
@@ -476,22 +477,39 @@ void Export_Compatibility_API() {
}
);
RemoteCall::exportAs("GMLIB_API", "getXuidByUuid", [](std::string const& uuid) -> std::string {
return UserCache::getInstance()->from(mce::UUID::fromString(uuid))->mXuid;
if (auto uce = UserCache::getInstance()->from(mce::UUID::fromString(uuid))) {
return uce->mXuid;
}
return "";
});
RemoteCall::exportAs("GMLIB_API", "getXuidByName", [](std::string const& name) -> std::string {
return UserCache::getInstance()->from(name)->mXuid;
if (auto uce = UserCache::getInstance()->from(name, UserCache::QueryType::Name)) {
return uce->mXuid;
}
return "";
});
RemoteCall::exportAs("GMLIB_API", "getNameByUuid", [](std::string const& uuid) -> std::string {
return UserCache::getInstance()->from(mce::UUID::fromString(uuid))->mName;
if (auto uce = UserCache::getInstance()->from(mce::UUID::fromString(uuid))) {
return uce->mName;
}
});
RemoteCall::exportAs("GMLIB_API", "getNameByXuid", [](std::string const& xuid) -> std::string {
return UserCache::getInstance()->from(xuid, UserCache::QueryType::Xuid)->mName;
if (auto uce = UserCache::getInstance()->from(xuid, UserCache::QueryType::Xuid)) {
return uce->mName;
}
return "";
});
RemoteCall::exportAs("GMLIB_API", "getUuidByXuid", [](std::string const& xuid) -> std::string {
return UserCache::getInstance()->from(xuid, UserCache::QueryType::Xuid)->mUuid.asString();
if (auto uce = UserCache::getInstance()->from(xuid, UserCache::QueryType::Xuid)) {
return uce->mUuid.asString();
}
return "";
});
RemoteCall::exportAs("GMLIB_API", "getUuidByName", [](std::string const& name) -> std::string {
return UserCache::getInstance()->from(name)->mUuid.asString();
if (auto uce = UserCache::getInstance()->from(name, UserCache::QueryType::Name)) {
return uce->mUuid.asString();
}
return "";
});
RemoteCall::exportAs(
"GMLIB_API",
+2 -2
View File
@@ -2,7 +2,7 @@
"format_version": 3,
"format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
"tooth": "github.com/GroupMountain/GMLIB-LegacyRemoteCallApi",
"version": "1.1.1",
"version": "1.1.2",
"info": {
"name": "GMLIB-LegacyRemoteCallApi",
"description": "Legacy RemoteCall API for GMLIB",
@@ -19,7 +19,7 @@
{
"platform": "win-x64",
"dependencies": {
"github.com/LiteLDev/LeviLamina": ">=1.1.1",
"github.com/LiteLDev/LeviLamina": ">=1.2.0",
"github.com/GroupMountain/GMLIB-Release": ">=1.2.0-rc.1",
"github.com/MiracleForest/iListenAttentively-Release": ">=0.5.0-rc.1"
},