1
0
mirror of https://github.com/HybridDog/nether-pack.git synced 2024-12-25 02:00:23 +01:00

fix creative dig

This commit is contained in:
DS-Minetest 2018-09-10 00:10:11 +02:00
parent fadf202663
commit 0d4a302103

View File

@ -35,10 +35,15 @@ local function add_fence(name)
end
--]]
local creative_installed = minetest.global_exists("creative")
local function digging_allowed(player, v)
if not player then
return false
end
if creative_installed and creative.is_enabled_for(player:get_player_name()) then
return true
end
local tool = player:get_wielded_item():get_name()
tool = minetest.registered_tools[tool] or tool == "" and minetest.registered_items[tool]
if not tool