Save player effects on server shutdown.

This commit is contained in:
Brandon 2020-08-05 20:18:18 -04:00
parent cfcaa4fa12
commit 49a5f765bd

View file

@ -455,6 +455,14 @@ minetest.register_on_joinplayer( function(player)
mcl_potions._load_player_effects(player) mcl_potions._load_player_effects(player)
end) 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)
-- ░██████╗██╗░░░██╗██████╗░██████╗░░█████╗░██████╗░████████╗██╗███╗░░██╗░██████╗░ -- ░██████╗██╗░░░██╗██████╗░██████╗░░█████╗░██████╗░████████╗██╗███╗░░██╗░██████╗░
-- ██╔════╝██║░░░██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██║████╗░██║██╔════╝░ -- ██╔════╝██║░░░██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██║████╗░██║██╔════╝░