mirror of
				https://gitlab.com/rubenwardy/awards.git
				synced 2025-10-31 04:55:32 +01:00 
			
		
		
		
	Corrige la commande /awards.
Corrige l'affige des awards d'un joueur donné. Empêche le retour de l'inventaire sfinv quand on active ou desactive les awards d'un joueur.
This commit is contained in:
		| @@ -33,7 +33,7 @@ minetest.register_chatcommand("awards", { | |||||||
| 			awards.show_to(action, name, nil, true) | 			awards.show_to(action, name, nil, true) | ||||||
| 		end | 		end | ||||||
|  |  | ||||||
| 		if (action == "disable" or action == "enable") and minetest.global_exists("sfinv") then | 		if (action == "disable" or action == "enable") and minetest.global_exists("sfinv") and not minetest.get_modpath("unified_inventory") then | ||||||
| 			local player = minetest.get_player_by_name(playern) | 			local player = minetest.get_player_by_name(playern) | ||||||
| 			if player then | 			if player then | ||||||
| 				sfinv.set_player_inventory_formspec(player) | 				sfinv.set_player_inventory_formspec(player) | ||||||
|   | |||||||
| @@ -168,7 +168,7 @@ function awards.show_to(name, to, sid, text) | |||||||
| 	if name == "" or name == nil then | 	if name == "" or name == nil then | ||||||
| 		name = to | 		name = to | ||||||
| 	end | 	end | ||||||
| 	local data = awards.player(to) | 	local data = awards.player(name) | ||||||
| 	if name == to and data.disabled then | 	if name == to and data.disabled then | ||||||
| 		minetest.chat_send_player(name, S("You've disabled awards. Type /awards enable to reenable.")) | 		minetest.chat_send_player(name, S("You've disabled awards. Type /awards enable to reenable.")) | ||||||
| 		return | 		return | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user