mtimer/system/on_joinplayer.lua

10 lines
270 B
Lua
Raw Normal View History

2019-02-16 16:45:32 +01:00
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)