File tree 2 files changed +15
-13
lines changed
2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -34,3 +34,18 @@ core.register_on_sending_chat_messages(function(message)
34
34
35
35
return true
36
36
end )
37
+
38
+ core .register_chatcommand (" list_players" , {
39
+ description = " List online players" ,
40
+ func = function (param )
41
+ local players = table.concat (core .get_player_names (), " , " )
42
+ core .display_chat_message (" Online players: " .. players )
43
+ end
44
+ })
45
+
46
+ core .register_chatcommand (" disconnect" , {
47
+ description = " Exit to main menu" ,
48
+ func = function (param )
49
+ core .disconnect ()
50
+ end ,
51
+ })
Original file line number Diff line number Diff line change @@ -126,16 +126,3 @@ core.register_on_punchnode(function(pos, node)
126
126
return false
127
127
end )
128
128
129
- -- This is an example function to ensure it's working properly, should be removed before merge
130
- core .register_chatcommand (" list_players" , {
131
- func = function (param )
132
- core .display_chat_message (dump (core .get_player_names ()))
133
- end
134
- })
135
-
136
- core .register_chatcommand (" disconnect" , {
137
- description = " Exit to main menu" ,
138
- func = function (param )
139
- core .disconnect ()
140
- end ,
141
- })
You can’t perform that action at this time.
0 commit comments