Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
- if not default.can_interact_with_node(clicker, pos) then
- return itemstack
- end
- if def.protected then
- if minetest.is_protected(pos,clicker:get_player_name()) then
- minetest.chat_send_player(clicker:get_player_name(),"This chest is locked and in another's player protection.")
- return itemstack
- end
- end
- minetest.sound_play(def.sound_open, {gain = 0.3,
- pos = pos, max_hear_distance = 10})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement