diff options
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -7,18 +7,19 @@ end -- Assign skin to player function skins.assign_player_skin(player, skin) local skin_obj - local skin_key if type(skin) == "string" then skin_obj = skins.get(skin) or skins.get(skins.default) else skin_obj = skin end - skin_key = skin_obj:get_key() - if skin_key == skins.default then - skin_key = "" + if skin_obj:is_applicable_for_player(player:get_player_name()) then + local skin_key = skin_obj:get_key() + if skin_key == skins.default then + skin_key = "" + end + player:set_attribute("skinsdb:skin_key", skin_key) end - player:set_attribute("skinsdb:skin_key", skin_key) end -- update visuals |