Merge pull request #73 from est31/hidebutton

Make inventory++ hide button for players without worldedit priv
This commit is contained in:
Anthony Zhang 2015-02-16 19:58:59 -05:00
commit 4336e7ca14

View File

@ -102,7 +102,10 @@ if unified_inventory then --unified inventory installed
end end
elseif inventory_plus then --inventory++ installed elseif inventory_plus then --inventory++ installed
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
inventory_plus.register_button(player, "worldedit_gui", "WorldEdit") local can_worldedit = minetest.check_player_privs(player:get_player_name(), {worldedit=true})
if can_worldedit then
inventory_plus.register_button(player, "worldedit_gui", "WorldEdit")
end
end) end)
--show the form when the button is pressed and hide it when done --show the form when the button is pressed and hide it when done