[Question] global version of on use

Post Reply
User avatar
Posts: 190
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

[Question] global version of on use

by Extex » Post

Is there some way to detect when a player is using an item and stop it. (Under certain conditions)
Player of PK, RIP. Creator of the light_tool and motorbike mods. Working on another mod which should be coming soon!

User avatar
Posts: 1462
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Question] global version of on use

by sorcerykid » Post

You could override the minetest.register_craftitem() function, and hook into the on_use callback. Take a look at my Antigrief mod for a basic example of the methodology:


Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests