diff --git a/init.lua b/init.lua index 6b1b111..24bd3d8 100644 --- a/init.lua +++ b/init.lua @@ -63,7 +63,7 @@ skybox.set = function(player, number) player:set_sky(sky[2], "skybox", textures, true) end player:set_clouds(sky[4]) - player:set_attribute("skybox:skybox", sky[1]) + player:get_meta():set_string("skybox:skybox", sky[1]) end end @@ -86,7 +86,7 @@ skybox.clear = function(player) player:set_moon({visible = true}) player:set_stars({visible = true}) - player:set_attribute("skybox:skybox", "off") + player:get_meta():set_string("skybox:skybox", "off") end skybox.add = function(def) @@ -102,7 +102,7 @@ end -- minetest.register_on_joinplayer(function(player) - local sky = player:get_attribute("skybox:skybox") + local sky = player:get_meta():get_string("skybox:skybox") if not sky or sky == "" then skybox.clear(player) else