diff options
author | Lejo <Lejo_1@web.de> | 2018-06-30 16:35:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-30 16:35:53 +0200 |
commit | 91b1b695ab1e5fa3ce391ef06ad058cbbe45db0f (patch) | |
tree | 922009d065cc6449d8c2657abee740e3f63d1f69 | |
parent | 2cff7234e017487934d1d1e95f6a312b41835e0d (diff) |
Make backward.
-rw-r--r-- | api.lua | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |