diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2018-05-31 18:13:05 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2018-05-31 18:13:05 +0100 |
commit | 20f827f4fbee4031aec571628c9096ea75f88fdc (patch) | |
tree | 4de82fd9a8e9472b582a21dfcb62d4865ada9d53 /cocoa.lua | |
parent | a2b9d8f4efad88452c4b7d8a510bf992f57dd388 (diff) |
add protection checks
Diffstat (limited to 'cocoa.lua')
-rw-r--r-- | cocoa.lua | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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}) |