mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 15:33:00 +00:00
basename error handling
This commit is contained in:
parent
191f1385b1
commit
1d93122801
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,9 @@ worldedit.register_command("basename", {
|
|||
description = "Returns the base name of nodes that use a given alias.",
|
||||
privs = {worldedit = true},
|
||||
parse = function(params_text)
|
||||
params_text = params_text or "air"
|
||||
if params_text == "" or not params_text then
|
||||
return false, "Node not specified."
|
||||
end
|
||||
return true, params_text
|
||||
end,
|
||||
func = function(name, params_text)
|
||||
|
|
Loading…
Reference in a new issue