1
0

52 lines
1.4 KiB
Lua
Raw Permalink Normal View History

2024-05-14 17:52:30 +03:00
local defs = {
{
hud_elem_type = "image",
position = {x = 0.02, y = 0.035},
offset = {x = 0, y = 0},
text = "essentials_logo.png",
scale = { x = 1, y = 1},
alignment = { x = 0, y = 0 },
},
{
hud_elem_type = "text",
position = {x = 0.055, y = 0.0145},
offset = {x = 0, y = 0},
text = "Essentials",
alignment = -1,
scale = { x = 50, y = 10},
number = 0x00FFFF,
},
{
hud_elem_type = "text",
position = {x = 0.081, y = 0.03},
offset = {x = 0, y = 0},
text = "Powered and created by",
alignment = -1,
scale = { x = 50, y = 10},
number = 0xFFFFFF,
},
{
hud_elem_type = "text",
position = {x = 0.075, y = 0.047},
offset = {x = 0, y = 0},
text = "SkyBuilder1717",
alignment = -1,
scale = { x = 50, y = 10},
number = 0x00FF00,
}
}
local hud
if essentials.watermark then
minetest.register_on_joinplayer(function(player)
for i, def in pairs(defs) do
hud = player:hud_add(def)
end
end)
end
minetest.register_on_leaveplayer(function(player)
for i, def in pairs(defs) do
player:hud_remove(def)
end
end)