mirror of
https://github.com/HybridDog/nether-pack.git
synced 2025-01-13 03:10:25 +01:00
fix creative dig
This commit is contained in:
parent
fadf202663
commit
0d4a302103
@ -35,10 +35,15 @@ local function add_fence(name)
|
|||||||
end
|
end
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
|
local creative_installed = minetest.global_exists("creative")
|
||||||
|
|
||||||
local function digging_allowed(player, v)
|
local function digging_allowed(player, v)
|
||||||
if not player then
|
if not player then
|
||||||
return false
|
return false
|
||||||
end
|
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()
|
local tool = player:get_wielded_item():get_name()
|
||||||
tool = minetest.registered_tools[tool] or tool == "" and minetest.registered_items[tool]
|
tool = minetest.registered_tools[tool] or tool == "" and minetest.registered_items[tool]
|
||||||
if not tool
|
if not tool
|
||||||
|
Loading…
Reference in New Issue
Block a user