mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-26 02:30:40 +01:00
Fix worldedit_gui not working in Minetest 0.4.10.
This commit is contained in:
parent
b70fd16da4
commit
9ec1a799d8
@ -37,12 +37,11 @@ Example:
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
worldedit.register_gui_handler = function(identifier, handler)
|
worldedit.register_gui_handler = function(identifier, handler)
|
||||||
|
local enabled = true
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
--ensure the form is not being exited since this is a duplicate message
|
if not enabled then return false end
|
||||||
if fields.quit then
|
enabled = false
|
||||||
return false
|
minetest.after(0.2, function() enabled = true end)
|
||||||
end
|
|
||||||
|
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
|
||||||
--ensure the player has permission to perform the action
|
--ensure the player has permission to perform the action
|
||||||
|
Loading…
Reference in New Issue
Block a user