diff options
Diffstat (limited to 'MCServer/Plugins/Debuggers')
-rw-r--r-- | MCServer/Plugins/Debuggers/Debuggers.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index b402c1867..80416acc7 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -80,6 +80,7 @@ function Initialize(Plugin) TestBlockAreasString() TestStringBase64() + TestUUIDFromName() --[[ -- Test cCompositeChat usage in console-logging: @@ -275,6 +276,36 @@ end +function TestUUIDFromName() + LOG("Testing UUID-from-Name resolution...") + + -- Test by querying a few existing names, along with a non-existent one: + local PlayerNames = + { + "xoft", + "aloe_vera", + "nonexistent_player", + } + -- WARNING: Blocking operation! DO NOT USE IN TICK THREAD! + local UUIDs = cClientHandle:GetUUIDsFromPlayerNames(PlayerNames) + + -- Log the results: + for _, name in ipairs(PlayerNames) 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 test finished.") +end + + + + + function TestSQLiteBindings() LOG("Testing SQLite bindings..."); |