minetest.register_on_cheat / false positives

Post Reply
User avatar
bosapara
Member
Posts: 617
Joined: Fri Apr 07, 2017 08:49

minetest.register_on_cheat / false positives

by bosapara » Post

Using cheat.type == "dug_unbreakable" give us false positives if we dig an example the dirt, must work only with unbreakable node like "stone + hand".

Any advices how to check on_cheat for unbreakable nodes?

Code: Select all

minetest.register_on_cheat(function(player, cheat)

 local name = player:get_player_name()

   if cheat.type == "dug_unbreakable" then
     minetest.log("warning", "[CHEAT DETECTION]: Player "..name.." is trying to instantly break unbreakable nodes!")
   end


end)
Image

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Zughy and 5 guests