build priv

Jun 1st, 2015
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. minetest.register_privilege("build", "Can place and dig nodes/blocks")
  3. minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
  4.     if not minetest.get_player_privs(placer:get_player_name()).build then
  5.        minetest.remove_node(pos)
  6.        return false, itemstack
  7.     end
  8. end)
  10. minetest.register_on_dignode(function(pos, oldnode, digger)
  11.     if not minetest.get_player_privs(digger:get_player_name()).build then
  12.        minetest.set_node({x=pos.x, y=pos.y, z=pos.z}, oldnode)
  13.        return false
  14.     end    
  15. end)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.