summaryrefslogtreecommitdiff
path: root/cocoa.lua
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa.lua')
-rw-r--r--cocoa.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/cocoa.lua b/cocoa.lua
index a8491ac..71d038e 100644
--- a/cocoa.lua
+++ b/cocoa.lua
@@ -31,6 +31,11 @@ local function place_cocoa(itemstack, placer, pointed_thing, plantname)
return
end
+ -- check for protection
+ if minetest.is_protected(pt.above, placer:get_player_name()) then
+ return
+ end
+
-- add the node and remove 1 item from the itemstack
minetest.set_node(pt.above, {name = plantname})