formspec can only write data to actual protection nodes

This commit is contained in:
TenPlus1 2018-07-03 13:24:05 +01:00
parent 4e969981e0
commit 534364e9c3
1 changed files with 8 additions and 0 deletions

View File

@ -535,6 +535,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
return
end
-- are we adding member to a protection node ? (csm protection)
local nod = minetest.get_node(pos).name
if nod ~= "protector:protect"
and nod ~= "protector:protect2" then
return
end
-- add member [+]
if fields.protector_add_member then