refactor: random fixes and usage improvements

This commit is contained in:
2025-02-17 17:01:23 -05:00
parent 8f2fbf11da
commit dde489a8ed
15 changed files with 203 additions and 90 deletions

View File

@@ -1,3 +1,17 @@
function get_player(name)
local target_uuid = nil
for uuid, player in client.tab_list do
if player.name == name then
target_uuid = uuid
break
end
end
return client:find_entities(function(e)
return e.kind == "minecraft:player" and e.uuid == target_uuid
end)[1]
end
function dump(object)
if type(object) == "table" then
local string = "{ "