1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

[CSM] Add function to get player names in range (#5435)

* [CSM] Add function to get currently connected player names
This commit is contained in:
bigfoot547 2017-03-22 15:13:03 -05:00 committed by Loïc Blot
parent c4b98deb61
commit 9efc5da0fb
4 changed files with 33 additions and 2 deletions

View file

@ -102,7 +102,7 @@ core.register_on_punchnode(function(pos, node)
print(dump(itemstack:get_count()))
print(dump(itemstack:get_wear()))
print(dump(itemstack:get_meta()))
print(dump(itemstack:get_metadata()))
print(dump(itemstack:get_metadata()
print(dump(itemstack:is_known()))
--print(dump(itemstack:get_definition()))
print(dump(itemstack:get_tool_capabilities()))
@ -120,3 +120,10 @@ core.register_on_punchnode(function(pos, node)
print("node:" .. dump(node))
return false
end)
-- This is an example function to ensure it's working properly, should be removed before merge
core.register_chatcommand("list_players", {
func = function(param)
core.display_chat_message(dump(core.get_player_names()))
end
})