From a23fc44e6d63596729c238df33b343ff4e1c6b0f Mon Sep 17 00:00:00 2001 From: crabman77 Date: Sat, 5 Mar 2016 18:04:16 +0100 Subject: [PATCH] fix hudbars define empty player name "" in hb.players table and show permanently error log --- mods/hudbars/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/hudbars/init.lua b/mods/hudbars/init.lua index a328a820..cf7b401b 100755 --- a/mods/hudbars/init.lua +++ b/mods/hudbars/init.lua @@ -335,9 +335,11 @@ local function update_hud(player) end minetest.register_on_joinplayer(function(player) + local name = player:get_player_name() + if not name or name == "" then return end hide_builtin(player) custom_hud(player) - hb.players[player:get_player_name()] = player + hb.players[name] = player end) minetest.register_on_leaveplayer(function(player)