mirror of
https://github.com/HybridDog/nether-pack.git
synced 2024-12-25 18:20:23 +01:00
fix creative dig
This commit is contained in:
parent
fadf202663
commit
0d4a302103
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user