mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Add basic protection support to builtin
This commit is contained in:
@@ -106,3 +106,14 @@ function minetest.setting_get_pos(name)
|
||||
return minetest.string_to_pos(value)
|
||||
end
|
||||
|
||||
-- To be overriden by protection mods
|
||||
function minetest.is_protected(pos, name)
|
||||
return false
|
||||
end
|
||||
|
||||
function minetest.record_protection_violation(pos, name)
|
||||
for _, func in pairs(minetest.registered_on_protection_violation) do
|
||||
func(pos, name)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user