mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2025-01-03 13:37:29 +01:00
add fake player check (#86)
This commit is contained in:
parent
04b45deec8
commit
7f20e5dcb7
@ -933,6 +933,10 @@ armor.get_valid_player = function(self, player, msg)
|
||||
minetest.log("warning", ("3d_armor%s: Player reference is nil"):format(msg))
|
||||
return
|
||||
end
|
||||
if type(player) ~= "userdata" then
|
||||
-- Fake player, fail silently
|
||||
return
|
||||
end
|
||||
local name = player:get_player_name()
|
||||
if not name then
|
||||
minetest.log("warning", ("3d_armor%s: Player name is nil"):format(msg))
|
||||
|
Loading…
Reference in New Issue
Block a user