Skip to content

Commit d263554

Browse files
author
Carter Kolwey
committedJan 3, 2014
Added compatibility with my version of creative_inventory.
1 parent 2ac049c commit d263554

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎worldedit_gui/init.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ else --fallback button
129129
return
130130
end
131131
local player = minetest.get_player_by_name(name)
132-
if minetest.setting_getbool("creative_mode") and creative_inventory then --creative_inventory is active, add button to modified formspec
132+
if (minetest.check_player_privs(name, {creative=true}) or minetest.setting_getbool("creative_mode")) and creative_inventory then --creative_inventory is active, add button to modified formspec
133133
formspec = player:get_inventory_formspec() .. "image_button[6,0;1,1;inventory_plus_worldedit_gui.png;worldedit_gui;]"
134134
else
135135
formspec = formspec .. "image_button[0,0;1,1;inventory_plus_worldedit_gui.png;worldedit_gui;]"
@@ -228,4 +228,4 @@ worldedit.register_gui_handler("worldedit_gui", function(name, fields)
228228
return false
229229
end)
230230

231-
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/functionality.lua")
231+
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/functionality.lua")

0 commit comments

Comments
 (0)
Please sign in to comment.