mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-30 23:15:32 +01:00 
			
		
		
		
	[CSM] Move .list_players and .disconnect to builtin. (#5550)
				
					
				
			This commit is contained in:
		| @@ -34,3 +34,18 @@ core.register_on_sending_chat_messages(function(message) | ||||
|  | ||||
| 	return true | ||||
| end) | ||||
|  | ||||
| core.register_chatcommand("list_players", { | ||||
| 	description = "List online players", | ||||
| 	func = function(param) | ||||
| 		local players = table.concat(core.get_player_names(), ", ") | ||||
| 		core.display_chat_message("Online players: " .. players) | ||||
| 	end | ||||
| }) | ||||
|  | ||||
| core.register_chatcommand("disconnect", { | ||||
| 	description = "Exit to main menu", | ||||
| 	func = function(param) | ||||
| 		core.disconnect() | ||||
| 	end, | ||||
| }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user