mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-15 20:25:16 +02:00
itemframes respect protections
This commit is contained in:
parent
17dfddfc35
commit
05efabc0d7
1 changed files with 5 additions and 0 deletions
|
@ -105,6 +105,11 @@ mcl_itemframes.update_entity = update_entity
|
|||
function mcl_itemframes.tpl_node.on_rightclick(pos, node, clicker, pstack, pointed_thing)
|
||||
local itemstack = pstack:take_item()
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
local name = clicker:get_player_name()
|
||||
if minetest.is_protected(pos, name) then
|
||||
minetest.record_protection_violation(pos, name)
|
||||
return
|
||||
end
|
||||
drop_item(pos)
|
||||
inv:set_stack("main", 1, itemstack)
|
||||
update_entity(pos)
|
||||
|
|
Loading…
Add table
Reference in a new issue