mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
Fix crash in mff's quests
This commit is contained in:
parent
8a63cb3792
commit
2010c907d7
@ -95,7 +95,10 @@ end
|
||||
|
||||
function mff.quests.handle_quest_end(playername, questname, metadata)
|
||||
for item, count in pairs(mff.quests.quests[mff.QNOPREFIX(questname)].awards) do
|
||||
minetest.add_item(minetest.get_player_by_name(playername):getpos(), {name=item, count=count, wear=0, metadata=""})
|
||||
local p = minetest.get_player_by_name(playername)
|
||||
if p then
|
||||
minetest.add_item(p:getpos(), {name=item, count=count, wear=0, metadata=""})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user