mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-10-31 23:30:30 +01:00
Item_names: Free table entry on player leave
This commit is contained in:
parent
945ab7f55b
commit
20f1c5c3c2
|
@ -33,6 +33,10 @@ minetest.register_on_joinplayer(function(player)
|
||||||
minetest.after(0, set_hud, player)
|
minetest.after(0, set_hud, player)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_leaveplayer(function(player)
|
||||||
|
item_names[player:get_player_name()] = nil
|
||||||
|
end)
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
local data = item_names[player:get_player_name()]
|
local data = item_names[player:get_player_name()]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user