forked from mtcontrib/hangglider
check for "is_player()" on "on_use"
fixes https://github.com/pandorabox-io/pandorabox.io/issues/547
This commit is contained in:
parent
a814fbe160
commit
d6af7437b2
3
init.lua
3
init.lua
@ -328,7 +328,8 @@ minetest.register_tool("hangglider:hangglider", {
|
||||
inventory_image = "glider_item.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, player)
|
||||
if not player then
|
||||
if not player or (player.is_player and not player:is_player()) then
|
||||
-- player does not exist or is created from an autometed machine (fake_player)
|
||||
return
|
||||
end
|
||||
local pos = player:get_pos()
|
||||
|
Loading…
Reference in New Issue
Block a user