bugfix and small optimization

This commit is contained in:
Alexander Weber 2017-06-20 07:34:09 +02:00 committed by stujones11
parent 2150fcea8d
commit db8fb5ebd4

@ -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