forked from mtcontrib/minetest_mana
Fix mana resetting for re-joining players
This commit is contained in:
parent
ff247cc261
commit
f6157dbc64
6
init.lua
6
init.lua
@ -204,8 +204,10 @@ end)
|
|||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
mana.hud_remove(playername)
|
if not minetest.get_modpath("hudbars") ~= nil then
|
||||||
mana.playerlist[playername] = nil
|
mana.hud_remove(playername)
|
||||||
|
end
|
||||||
|
mana.save_to_file()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_shutdown(function()
|
minetest.register_on_shutdown(function()
|
||||||
|
Loading…
Reference in New Issue
Block a user