This commit is contained in:
Elias Fleckenstein 2021-02-22 11:08:57 +01:00
parent 5de9d90569
commit 86dc33c12f
2 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,7 @@ end
-- Load default settings -- Load default settings
dofile(minetest.get_modpath("hudbars").."/default_settings.lua") dofile(minetest.get_modpath("hudbars").."/default_settings.lua")
if minetest.get_modpath("mcl_experience") then if minetest.get_modpath("mcl_experience") and not minetest.is_creative_enabled("") then
-- reserve some space for experience bar: -- reserve some space for experience bar:
hb.settings.start_offset_left.y = hb.settings.start_offset_left.y - 20 hb.settings.start_offset_left.y = hb.settings.start_offset_left.y - 20
hb.settings.start_offset_right.y = hb.settings.start_offset_right.y - 20 hb.settings.start_offset_right.y = hb.settings.start_offset_right.y - 20

View File

@ -66,6 +66,9 @@ end)
-- create instance of new hud -- create instance of new hud
hud_manager.add_hud = function(player,hud_name,def) hud_manager.add_hud = function(player,hud_name,def)
local name = player:get_player_name() local name = player:get_player_name()
if minetest.is_creative_enabled(name) then
return
end
local local_hud = player:hud_add({ local local_hud = player:hud_add({
hud_elem_type = def.hud_elem_type, hud_elem_type = def.hud_elem_type,
position = def.position, position = def.position,