mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-07 23:47:29 +01:00
Only owner and delprotect privelaged can remove protectors
This commit is contained in:
parent
8fdb475a1e
commit
fe08f89bf1
8
init.lua
8
init.lua
@ -216,9 +216,7 @@ minetest.register_node("protector:protect", {
|
||||
end,
|
||||
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
return (meta:get_string("owner") == player:get_player_name())
|
||||
return protector.can_dig(1,pos,player:get_player_name(),true,1)
|
||||
end,
|
||||
})
|
||||
|
||||
@ -282,9 +280,7 @@ minetest.register_node("protector:protect2", {
|
||||
end,
|
||||
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
return (meta:get_string("owner") == player:get_player_name())
|
||||
return protector.can_dig(1,pos,player:get_player_name(),true,1)
|
||||
end,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user