summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Debuggers
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 /MCServer/Plugins/Debuggers
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 'MCServer/Plugins/Debuggers')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua32
1 files changed, 31 insertions, 1 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 575d696cb..075cfa40c 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -307,8 +307,38 @@ function TestUUIDFromName()
"aloe_vera",
}
UUIDs = cMojangAPI:GetUUIDsFromPlayerNames(ValidPlayerNames);
+
+ -- Log the results:
+ for _, name in ipairs(ValidPlayerNames) do
+ local UUID = UUIDs[name]
+ if (UUID == nil) then
+ LOG(" UUID(" .. name .. ") not found.")
+ else
+ LOG(" UUID(" .. name .. ") = \"" .. UUID .. "\"")
+ end
+ end
+
+ -- Test yet again, cache-only:
+ LOG("Testing once more, cache only...")
+ local PlayerNames3 =
+ {
+ "xoft",
+ "aloe_vera",
+ "notch", -- Valid player name, but not cached (most likely :)
+ }
+ UUIDs = cMojangAPI:GetUUIDsFromPlayerNames(PlayerNames3, true)
- LOG("UUID-from-Name resolution test finished.")
+ -- Log the results:
+ for _, name in ipairs(PlayerNames3) do
+ local UUID = UUIDs[name]
+ if (UUID == nil) then
+ LOG(" UUID(" .. name .. ") not found.")
+ else
+ LOG(" UUID(" .. name .. ") = \"" .. UUID .. "\"")
+ end
+ end
+
+ LOG("UUID-from-Name resolution tests finished.")
end