mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2025-07-03 16:40:38 +02:00
move logic to method
This commit is contained in:
@ -4,6 +4,19 @@ if minetest.get_modpath("areas") then
|
||||
area_protection.areas = areas
|
||||
end
|
||||
|
||||
local area_protection.interaction_restrictions = function(
|
||||
area_protection,
|
||||
player_name
|
||||
)
|
||||
if area_protection.areas then
|
||||
if minetest.check_player_privs(name, {areas = true}) then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local area_protection.interaction_allowed = function(
|
||||
area_protection,
|
||||
description,
|
||||
|
Reference in New Issue
Block a user