mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 12:45:10 +00:00
Check for protection when using anvil formspec
This commit is contained in:
parent
986871f2b5
commit
3ba4aabbcf
1 changed files with 5 additions and 0 deletions
|
@ -407,6 +407,11 @@ local anvildef = {
|
||||||
meta:set_string("formspec", form)
|
meta:set_string("formspec", form)
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
|
local sender_name = sender:get_player_name()
|
||||||
|
if minetest.is_protected(pos, sender_name) then
|
||||||
|
minetest.record_protection_violation(pos, sender_name)
|
||||||
|
return
|
||||||
|
end
|
||||||
if fields.name_button or fields.name then
|
if fields.name_button or fields.name then
|
||||||
local set_name
|
local set_name
|
||||||
if fields.name == nil then
|
if fields.name == nil then
|
||||||
|
|
Loading…
Reference in a new issue