Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
  2.                         if not default.can_interact_with_node(clicker, pos) then
  3.                                 return itemstack
  4.                         end
  5.  
  6. if def.protected then
  7. if minetest.is_protected(pos,clicker:get_player_name()) then
  8. minetest.chat_send_player(clicker:get_player_name(),"This chest is locked and in another's player protection.")
  9. return itemstack
  10. end
  11. end
  12.  
  13.                         minetest.sound_play(def.sound_open, {gain = 0.3,
  14.                                         pos = pos, max_hear_distance = 10})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement