Fix creative mode check again
authorsfan5 <sfan5@live.de>
Sun, 25 Mar 2018 12:05:25 +0000 (14:05 +0200)
committerGitHub <noreply@github.com>
Sun, 25 Mar 2018 12:05:25 +0000 (14:05 +0200)
mods/fireflies/init.lua

index 6282636c613898e000d13ff60d0f847897656a01..47ad373fd737e9098031e5e7b70c3570a94f5ad7 100644 (file)
@@ -103,7 +103,7 @@ minetest.register_tool("fireflies:bug_net", {
                                minetest.add_item(pointed_thing.under, node_name.." 1")
                        end
                end
-               if not creative.is_enabled_for(player:get_player_name()) then
+               if not (creative and creative.is_enabled_for(player:get_player_name())) then
                        itemstack:add_wear(256)
                        return itemstack
                end