changed checxk ownership position

This commit is contained in:
Alexsandro Percy 2023-05-15 19:31:46 -03:00
parent 26000c4f21
commit 1414c13594

View file

@ -735,9 +735,6 @@ minetest.register_entity("ap_airship:airship", {
local is_admin = false local is_admin = false
is_admin = minetest.check_player_privs(puncher, {server=true}) is_admin = minetest.check_player_privs(puncher, {server=true})
local name = puncher:get_player_name() local name = puncher:get_player_name()
if self.owner and self.owner ~= name and self.owner ~= "" then
if is_admin == false then return end
end
if self.owner == nil then if self.owner == nil then
self.owner = name self.owner = name
end end
@ -757,6 +754,9 @@ minetest.register_entity("ap_airship:airship", {
--refuel --refuel
ap_airship.load_fuel(self, puncher) ap_airship.load_fuel(self, puncher)
end end
if self.owner and self.owner ~= name and self.owner ~= "" then
if is_admin == false then return end
end
-- deal with painting or destroying -- deal with painting or destroying
if itmstck then if itmstck then