feat: name cache

This commit is contained in:
Tsubasa6848
2024-02-28 06:11:43 +08:00
Unverified
parent b6541ba6ac
commit d201563742
4 changed files with 51 additions and 7 deletions
+1 -2
View File
@@ -10,7 +10,6 @@ bool saveInventory(Player& player) {
if (newFile.is_open()) {
newFile.write(nbt.c_str(), nbt.size());
newFile.close();
return true;
}
}
@@ -89,7 +88,7 @@ std::string getNameFormUuid(mce::UUID& uuid) {
name = player->getRealName();
} else {
auto strUuid = uuid.asString();
auto cachename = GMLIB::Server::UserCache::getNameByUuid(strUuid);
auto cachename = getNameFromUuid(strUuid);
if (cachename.has_value()) {
name = cachename.value();
} else {