added admin to remove or edit

This commit is contained in:
Alexsandro Percy 2021-07-11 12:18:23 -03:00
parent fb47dde7d3
commit 75c8981dc3

View File

@ -269,8 +269,12 @@ minetest.register_entity("trike:trike", {
if not puncher or not puncher:is_player() then
return
end
local is_admin = false
is_admin = minetest.check_player_privs(puncher, {server=true})
local name = puncher:get_player_name()
if self.owner and self.owner ~= name and self.owner ~= "" then return end
if self.owner and self.owner ~= name and self.owner ~= "" then
if is_admin == false then return end
end
if self.owner == nil then
self.owner = name
end