mtimer/system/on_joinplayer.lua
2019-02-16 16:45:32 +01:00

10 lines
270 B
Lua

local m = mtimer
minetest.register_on_joinplayer(function(player)
local meta = player:get_meta()
for _,def in pairs(m.meta) do
local current = meta:get_string(def.key)
if current == '' then meta:set_string(def.key, def.default) end
end
end)