summaryrefslogtreecommitdiffstats
path: root/src/Protocol/MojangAPI.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-31 10:02:50 +0200
committermadmaxoft <github@xoft.cz>2014-07-31 10:02:50 +0200
commit8b519bf6e20a987c9544ef11f0df6467831cc069 (patch)
tree4d6c3b6d74db42e9f0ff271b164febdbd25c5479 /src/Protocol/MojangAPI.cpp
parentMojangAPI: Renamed cache file to MojangAPI.sqlite. (diff)
downloadcuberite-8b519bf6e20a987c9544ef11f0df6467831cc069.tar
cuberite-8b519bf6e20a987c9544ef11f0df6467831cc069.tar.gz
cuberite-8b519bf6e20a987c9544ef11f0df6467831cc069.tar.bz2
cuberite-8b519bf6e20a987c9544ef11f0df6467831cc069.tar.lz
cuberite-8b519bf6e20a987c9544ef11f0df6467831cc069.tar.xz
cuberite-8b519bf6e20a987c9544ef11f0df6467831cc069.tar.zst
cuberite-8b519bf6e20a987c9544ef11f0df6467831cc069.zip
Diffstat (limited to 'src/Protocol/MojangAPI.cpp')
-rw-r--r--src/Protocol/MojangAPI.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Protocol/MojangAPI.cpp b/src/Protocol/MojangAPI.cpp
index 5fbc5b476..71a5e53de 100644
--- a/src/Protocol/MojangAPI.cpp
+++ b/src/Protocol/MojangAPI.cpp
@@ -129,7 +129,7 @@ void cMojangAPI::Start(cIniFile & a_SettingsIni)
-AStringVector cMojangAPI::GetUUIDsFromPlayerNames(const AStringVector & a_PlayerNames)
+AStringVector cMojangAPI::GetUUIDsFromPlayerNames(const AStringVector & a_PlayerNames, bool a_UseOnlyCached)
{
// Convert all playernames to lowercase:
AStringVector PlayerNames;
@@ -140,7 +140,10 @@ AStringVector cMojangAPI::GetUUIDsFromPlayerNames(const AStringVector & a_Player
} // for itr - a_PlayerNames[]
// Request the cache to populate any names not yet contained:
- CacheNamesToUUIDs(PlayerNames);
+ if (!a_UseOnlyCached)
+ {
+ CacheNamesToUUIDs(PlayerNames);
+ }
// Retrieve from cache:
size_t idx = 0;