From d6af7437b25c32a4c1879f0df3d6e59101f69344 Mon Sep 17 00:00:00 2001 From: Buckaroo Banzai <39065740+BuckarooBanzay@users.noreply.github.com> Date: Mon, 5 Oct 2020 07:00:23 +0200 Subject: [PATCH] check for "is_player()" on "on_use" fixes https://github.com/pandorabox-io/pandorabox.io/issues/547 --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2e7952d..3955bad 100644 --- a/init.lua +++ b/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()