mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-11-22 15:23:44 +01:00
prevent crash when a non-player object digs a node
This commit is contained in:
parent
1ffa8f10ac
commit
a0b232aa2b
@ -152,7 +152,9 @@ function awards.register_trigger(tname, tdef)
|
|||||||
end
|
end
|
||||||
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 name = player:get_player_name()
|
||||||
local data = awards.player(name)
|
local data = awards.player(name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user