mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-25 02:00:39 +01:00
Improve brush command error messages
This commit is contained in:
parent
9b26034aea
commit
f285a55dd5
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user