mirror of
https://github.com/mt-mods/plantlife_modpack.git
synced 2024-12-26 18:40:18 +01:00
add ownership check when placing juncus grass
This commit is contained in:
parent
4e54d23c4d
commit
2349447ba8
@ -44,6 +44,12 @@ minetest.register_node("dryplants:juncus", {
|
||||
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(pointed_thing.above, playername) or
|
||||
minetest.is_protected(pointed_thing.under, playername) then
|
||||
minetest.chat_send_player(playername, "Someone else owns that spot.")
|
||||
return
|
||||
end
|
||||
local pos = pointed_thing.under
|
||||
local juncus_type = math.random(2,3)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
|
Loading…
Reference in New Issue
Block a user