1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2024-12-24 09:40:41 +01:00

Improve brush command error messages

This commit is contained in:
sfan5 2020-04-07 00:38:11 +02:00
parent 9b26034aea
commit f285a55dd5

View File

@ -101,7 +101,7 @@ worldedit.register_command("brush", {
else else
local cmddef = worldedit.registered_commands[cmd] local cmddef = worldedit.registered_commands[cmd]
if cmddef == nil or cmddef.require_pos ~= 1 then if cmddef == nil or cmddef.require_pos ~= 1 then
worldedit.player_notify(name, "Invalid command for brush use: //" .. cmd) worldedit.player_notify(name, "//" .. cmd .. " cannot be used with brushes")
return return
end end
@ -109,7 +109,7 @@ worldedit.register_command("brush", {
local ok, err = cmddef.parse(params) local ok, err = cmddef.parse(params)
if not ok then if not ok then
err = err or "invalid usage" err = err or "invalid usage"
worldedit.player_notify(name, "Brush command: " .. err) worldedit.player_notify(name, "Error with brush command: " .. err)
return return
end end