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
1 changed files with 3 additions and 0 deletions

View File

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