#138 Skip nil index in mcl_shields

This commit is contained in:
kay27 2022-01-25 20:32:14 +04:00
parent a996db13d1
commit 64d760df01
1 changed files with 4 additions and 3 deletions

View File

@ -173,9 +173,10 @@ local function set_shield(player, block, i)
end
end
local shield = mcl_shields.players[player].shields[i]
if shield then
shield:get_luaentity()._blocking = block
end
if not shield then return end
local luaentity = shield:get_luaentity()
if not luaentity then return end
luaentity._blocking = block
end
local function set_interact(player, interact)