mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-02 00:33:47 +01:00
Check for valid player inventory
This commit is contained in:
parent
eedf913638
commit
85f56f7ba0
@ -80,6 +80,9 @@ armor.set_player_armor = function(self, player)
|
|||||||
end
|
end
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local player_inv = player:get_inventory()
|
local player_inv = player:get_inventory()
|
||||||
|
if not name or not player_inv then
|
||||||
|
return
|
||||||
|
end
|
||||||
local armor_texture = "3d_armor_trans.png"
|
local armor_texture = "3d_armor_trans.png"
|
||||||
local armor_level = 0
|
local armor_level = 0
|
||||||
local armor_heal = 0
|
local armor_heal = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user