mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-12 19:10:26 +01:00
fix hudbars define empty player name "" in hb.players table and show permanently error log
This commit is contained in:
parent
c54bdbef03
commit
a23fc44e6d
@ -335,9 +335,11 @@ local function update_hud(player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name or name == "" then return end
|
||||||
hide_builtin(player)
|
hide_builtin(player)
|
||||||
custom_hud(player)
|
custom_hud(player)
|
||||||
hb.players[player:get_player_name()] = player
|
hb.players[name] = player
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
|
Loading…
Reference in New Issue
Block a user