1
0
mirror of https://gitlab.com/rubenwardy/awards.git synced 2024-12-27 11:10:41 +01:00

prevent crash when a non-player object digs a node

This commit is contained in:
FaceDeer 2019-08-05 09:01:27 -06:00
parent 1ffa8f10ac
commit a0b232aa2b

View File

@ -152,7 +152,9 @@ function awards.register_trigger(tname, tdef)
end
end
assert(player and player.is_player and player:is_player() and key)
if not (player and player.is_player and player:is_player() and key) then
return
end
local name = player:get_player_name()
local data = awards.player(name)