1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-07-16 06:40:22 +02:00

2 Commits

Author SHA1 Message Date
f1b6da3c20 Hide gui button in unified_inventory on missing privilege (#195)
this fixes #151
2020-12-05 14:12:32 +01:00
418a30c89e Raise safe region limit to 20000 2020-10-06 13:53:22 +02:00
2 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,7 @@ local safe_region_callback = {}
--`count` is the number of nodes that would possibly be modified --`count` is the number of nodes that would possibly be modified
--`callback` is a callback to run when the user confirms --`callback` is a callback to run when the user confirms
local function safe_region(name, count, callback) local function safe_region(name, count, callback)
if count < 10000 then if count < 20000 then
return callback() return callback()
end end

View File

@ -80,6 +80,9 @@ if minetest.global_exists("unified_inventory") then -- unified inventory install
unified_inventory.register_button("worldedit_gui", { unified_inventory.register_button("worldedit_gui", {
type = "image", type = "image",
image = "inventory_plus_worldedit_gui.png", image = "inventory_plus_worldedit_gui.png",
condition = function(player)
return minetest.check_player_privs(player:get_player_name(), {worldedit=true})
end,
}) })
minetest.register_on_player_receive_fields(function(player, formname, fields) minetest.register_on_player_receive_fields(function(player, formname, fields)