Hide gui button in unified_inventory on missing privilege (#195)

this fixes #151
This commit is contained in:
h3ndrik 2020-12-05 14:12:32 +01:00 committed by GitHub
parent 418a30c89e
commit f1b6da3c20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -80,6 +80,9 @@ if minetest.global_exists("unified_inventory") then -- unified inventory install
unified_inventory.register_button("worldedit_gui", {
type = "image",
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)