fix obj nil bug
This commit is contained in:
parent
a37e8e651e
commit
038aece5f7
1 changed files with 3 additions and 1 deletions
4
init.lua
4
init.lua
|
|
@ -241,7 +241,9 @@ function minetest.is_protected(pos, digger)
|
|||
|
||||
-- drop stack
|
||||
local obj = minetest.add_item(player:getpos(), sta)
|
||||
obj:setvelocity({x = 0, y = 5, z = 0})
|
||||
if obj then
|
||||
obj:setvelocity({x = 0, y = 5, z = 0})
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue