mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-26 02:30:40 +01:00
Fix undeclared global variable
This commit is contained in:
parent
35b68c481b
commit
7a19c5303b
@ -67,7 +67,7 @@ local get_formspec = function(name, identifier)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--implement worldedit.show_page(name, page) in different ways depending on the available APIs
|
--implement worldedit.show_page(name, page) in different ways depending on the available APIs
|
||||||
if unified_inventory then --unified inventory installed
|
if rawget(_G, "unified_inventory") then --unified inventory installed
|
||||||
local old_func = worldedit.register_gui_function
|
local old_func = worldedit.register_gui_function
|
||||||
worldedit.register_gui_function = function(identifier, options)
|
worldedit.register_gui_function = function(identifier, options)
|
||||||
old_func(identifier, options)
|
old_func(identifier, options)
|
||||||
@ -100,7 +100,7 @@ if unified_inventory then --unified inventory installed
|
|||||||
player:set_inventory_formspec(get_formspec(name, page))
|
player:set_inventory_formspec(get_formspec(name, page))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif inventory_plus then --inventory++ installed
|
elseif rawget(_G, "inventory_plus") then --inventory++ installed
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
local can_worldedit = minetest.check_player_privs(player:get_player_name(), {worldedit=true})
|
local can_worldedit = minetest.check_player_privs(player:get_player_name(), {worldedit=true})
|
||||||
if can_worldedit then
|
if can_worldedit then
|
||||||
|
Loading…
Reference in New Issue
Block a user