diff --git a/i4/src/api.lua b/i4/src/api.lua index 8b932a5..cbf80d8 100644 --- a/i4/src/api.lua +++ b/i4/src/api.lua @@ -338,6 +338,9 @@ i4.new_footer_button("home", { description = S"Go home", image = "i3_home.png", fields = home_footer_fields, + access = function(player, data) + return minetest.check_player_privs(player:get_player_name(), {home = true}) + end }) i4.register_craft_type("digging", { diff --git a/i4/src/gui.lua b/i4/src/gui.lua index dd7cdab..b48dc68 100644 --- a/i4/src/gui.lua +++ b/i4/src/gui.lua @@ -615,7 +615,9 @@ local function settings_footer_fs(player, data, fs) -- i4 stores home coordinates with one decimal of precision, as the blow fmt() statement -- assumes. So we need to trim sethome’s coordinates to one decimal, likewise. local home_pos = sethome.get(player:get_player_name()) - home = string.format("(%.1f,%.1f,%.1f)", home_pos.x, home_pos.y, home_pos.z) + if home_pos then + home = string.format("(%.1f,%.1f,%.1f)", home_pos.x, home_pos.y, home_pos.z) + end end if home then