mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2025-01-08 23:20:17 +01:00
Make backward.
This commit is contained in:
parent
2cff7234e0
commit
91b1b695ab
4
api.lua
4
api.lua
@ -2,6 +2,10 @@
|
|||||||
local storage = minetest.get_mod_storage()
|
local storage = minetest.get_mod_storage()
|
||||||
|
|
||||||
function skins.get_player_skin(player)
|
function skins.get_player_skin(player)
|
||||||
|
if player:get_attribute("skinsdb:skin_key") then
|
||||||
|
storage:set_string(player:get_player_name(), player:get_attribute("skinsdb:skin_key"))
|
||||||
|
player:set_attribute("skinsdb:skin_key", nil)
|
||||||
|
end
|
||||||
local skin = storage:get_string(player:get_player_name())
|
local skin = storage:get_string(player:get_player_name())
|
||||||
return skins.get(skin) or skins.get(skins.default)
|
return skins.get(skin) or skins.get(skins.default)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user