mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Fix #1150
This commit is contained in:
parent
5de9d90569
commit
86dc33c12f
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue