minetest.register_on_dignode

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.register_on_dignode(function(pos, oldnode, digger))

Description

Called when a node has been dug.

Example

minetest.register_on_dignode(function(pos, oldnode, digger)
    print("Node " .. oldnode.name .. " at " ..  minetest.pos_to_string(pos) .. " dug by " .. digger:get_player_name())
end)
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox