Browse Source

Make backward.

pull/17/head
Lejo 1 year ago
parent
commit
91b1b695ab
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      api.lua

+ 4
- 0
api.lua View File

@@ -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…
Cancel
Save