mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +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 is_admin == false then return end
|
||||
end
|
||||
|
||||
if self.driver_name and self.driver_name ~= name then
|
||||
-- do not allow other players to remove the object while there is a driver
|
||||
return
|
||||
end
|
||||
|
||||
if is_admin == false and minetest.check_player_privs(puncher, {protection_bypass=false}) then
|
||||
if self.driver_name and self.driver_name ~= name then
|
||||
-- do not allow other players to remove the object while there is a driver
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local is_attached = false
|
||||
local player_attach = puncher:get_attach()
|
||||
|
|
Loading…
Add table
Reference in a new issue