basename error handling

This commit is contained in:
VorTechnix 2021-02-24 09:19:08 -08:00
parent 191f1385b1
commit 1d93122801

@ -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)