mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 18:41:21 +00:00
ignore protection to destoy when is an admin doing it
This commit is contained in:
parent
e0e77ed680
commit
ed43997bea
1 changed files with 7 additions and 5 deletions
|
@ -684,11 +684,13 @@ function airutils.on_punch(self, puncher, ttime, toolcaps, dir, damage)
|
||||||
if self.owner and self.owner ~= name and self.owner ~= "" then
|
if self.owner and self.owner ~= name and self.owner ~= "" then
|
||||||
if is_admin == false then return end
|
if is_admin == false then return end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.driver_name and self.driver_name ~= name then
|
if is_admin == false and minetest.check_player_privs(puncher, {protection_bypass=false}) then
|
||||||
-- do not allow other players to remove the object while there is a driver
|
if self.driver_name and self.driver_name ~= name then
|
||||||
return
|
-- do not allow other players to remove the object while there is a driver
|
||||||
end
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local is_attached = false
|
local is_attached = false
|
||||||
local player_attach = puncher:get_attach()
|
local player_attach = puncher:get_attach()
|
||||||
|
|
Loading…
Add table
Reference in a new issue