1
0
Fork 0

Fix crash with cape when player has default skin

This commit is contained in:
Araca 2024-02-04 21:59:12 +01:00
parent 87abd0f4dc
commit 37fadc9099
1 changed files with 9 additions and 7 deletions

View File

@ -163,6 +163,7 @@ function mcl_skins.update_player_skin(player)
local skin = mcl_skins.player_skins[player] local skin = mcl_skins.player_skins[player]
local skinval = mcl_skins.compile_skin(skin) local skinval = mcl_skins.compile_skin(skin)
if skin then
if not skin.cape then skin.cape = "blank.png" end if not skin.cape then skin.cape = "blank.png" end
if player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra" then if player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra" then
@ -171,6 +172,7 @@ function mcl_skins.update_player_skin(player)
-- this is NOT used when the player puts an elytra on, see register.lua in mcl_armor for that. -- this is NOT used when the player puts an elytra on, see register.lua in mcl_armor for that.
-- this is used when a player joins or changes something regarding their skin. -- this is used when a player joins or changes something regarding their skin.
end end
end
mcl_player.player_set_skin(player, skinval) mcl_player.player_set_skin(player, skinval)