mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-22 23:40:18 +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()
|
||||
|
||||
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())
|
||||
return skins.get(skin) or skins.get(skins.default)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user