mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 17:43:53 +01:00
basename error handling
This commit is contained in:
parent
191f1385b1
commit
1d93122801
@ -8,7 +8,9 @@ worldedit.register_command("basename", {
|
|||||||
description = "Returns the base name of nodes that use a given alias.",
|
description = "Returns the base name of nodes that use a given alias.",
|
||||||
privs = {worldedit = true},
|
privs = {worldedit = true},
|
||||||
parse = function(params_text)
|
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
|
return true, params_text
|
||||||
end,
|
end,
|
||||||
func = function(name, params_text)
|
func = function(name, params_text)
|
||||||
|
Loading…
Reference in New Issue
Block a user