mirror of
https://git.0x7be.net/dirk/uniham.git
synced 2024-11-25 00:33:49 +01:00
add protection support
This commit is contained in:
parent
d295e5f012
commit
a0502007a3
@ -49,6 +49,12 @@ uniham.crush_nodes = function (itemstack, player, pointed_thing)
|
||||
local node_pos = minetest.get_pointed_thing_position(pointed_thing)
|
||||
local node_name = minetest.get_node(node_pos).name
|
||||
local node_sound = get_sound(minetest.registered_nodes[node_name], 'dug')
|
||||
local player_name = player:get_player_name()
|
||||
|
||||
if minetest.is_protected(node_pos, player_name) then
|
||||
minetest.record_protection_violation(node_pos, player_name)
|
||||
return
|
||||
end
|
||||
|
||||
if not replacements[node_name] then
|
||||
if node_sound then
|
||||
|
Loading…
Reference in New Issue
Block a user