diff --git a/3d_armor/api.lua b/3d_armor/api.lua index 56ae39f..4981f88 100644 --- a/3d_armor/api.lua +++ b/3d_armor/api.lua @@ -376,15 +376,12 @@ armor.damage = function(self, player, index, stack, use) end armor.get_player_skin = function(self, name) - if self.skin_mod == "skins" or self.skin_mod == "simple_skins" and skins.skins[name] then + if (self.skin_mod == "skins" or self.skin_mod == "simple_skins") and skins.skins[name] then return skins.skins[name]..".png" elseif self.skin_mod == "u_skins" and u_skins.u_skins[name] then return u_skins.u_skins[name]..".png" - elseif self.skin_mod == "wardrobe" then - local skins = wardrobe.playerSkins or {} - if skins[name] then - return skins[name] - end + elseif self.skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then + return wardrobe.playerSkins[name] end return armor.default_skin..".png" end