From 49a5f765bd45f9c315c81a7ff498d3653fcacdaa Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 5 Aug 2020 20:18:18 -0400 Subject: [PATCH] Save player effects on server shutdown. --- mods/ITEMS/mcl_potions/functions.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 7d61f2c8..539727b5 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -455,6 +455,14 @@ minetest.register_on_joinplayer( function(player) mcl_potions._load_player_effects(player) end) +minetest.register_on_shutdown(function() + -- save player effects on server shutdown + for _,player in ipairs(minetest.get_connected_players()) do + mcl_potions._save_player_effects(player) + end + +end) + -- ░██████╗██╗░░░██╗██████╗░██████╗░░█████╗░██████╗░████████╗██╗███╗░░██╗░██████╗░ -- ██╔════╝██║░░░██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██║████╗░██║██╔════╝░