mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-27 11:10:39 +01:00
More player validity checks
This commit is contained in:
parent
db312b3245
commit
b741b7426b
@ -172,7 +172,8 @@ end
|
||||
armor.init_player_armor = function(self, player)
|
||||
local name = player:get_player_name()
|
||||
local player_inv = player:get_inventory()
|
||||
if not name or not player_inv then
|
||||
local pos = player:getpos()
|
||||
if not name or not player_inv or not pos then
|
||||
return false
|
||||
end
|
||||
local armor_inv = minetest.create_detached_inventory(name.."_armor", {
|
||||
|
Loading…
Reference in New Issue
Block a user