Save player effects on server shutdown.

This commit is contained in:
Brandon 2020-08-05 20:18:18 -04:00
parent cfcaa4fa12
commit 49a5f765bd
1 changed files with 8 additions and 0 deletions

View File

@ -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)
-- ░██████╗██╗░░░██╗██████╗░██████╗░░█████╗░██████╗░████████╗██╗███╗░░██╗░██████╗░
-- ██╔════╝██║░░░██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██║████╗░██║██╔════╝░