core: if worldedit is installed also register commands there

This ensures that e.g. //cubeapply continues to work as expected
This commit is contained in:
Starbeamrainbowlabs 2022-05-19 22:13:09 +01:00
parent 8de49ac0af
commit c2c0fa5d8d
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -58,6 +58,9 @@ local function register_command(cmdname, options)
end end
}) })
wea_c.registered_commands[cmdname] = options wea_c.registered_commands[cmdname] = options
if minetest.global_exists("worldedit") then
worldedit.registered_commands[cmdname] = options
end
end end
return register_command return register_command