summaryrefslogtreecommitdiff
path: root/clientmods
diff options
context:
space:
mode:
authorbigfoot547 <bigfoot547@users.noreply.github.com>2017-03-22 15:13:03 -0500
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-03-22 21:13:03 +0100
commit9efc5da0fb7d276deff55db6e4eb89d24ca72b5d (patch)
tree5f6c3d614d2f2780867c3407c7a94c0f26a29b41 /clientmods
parentc4b98deb616fbe204c503d678fb920baa33cbede (diff)
downloadminetest-9efc5da0fb7d276deff55db6e4eb89d24ca72b5d.tar.gz
minetest-9efc5da0fb7d276deff55db6e4eb89d24ca72b5d.tar.bz2
minetest-9efc5da0fb7d276deff55db6e4eb89d24ca72b5d.zip
[CSM] Add function to get player names in range (#5435)
* [CSM] Add function to get currently connected player names
Diffstat (limited to 'clientmods')
-rw-r--r--clientmods/preview/init.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/clientmods/preview/init.lua b/clientmods/preview/init.lua
index 008f7ac14..c57a62155 100644
--- a/clientmods/preview/init.lua
+++ b/clientmods/preview/init.lua
@@ -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
+})