From 1d93122801117da5445638c8103af52f656fc828 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Wed, 24 Feb 2021 09:19:08 -0800 Subject: [PATCH] basename error handling --- worldeditadditions_commands/commands/extra/basename.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/worldeditadditions_commands/commands/extra/basename.lua b/worldeditadditions_commands/commands/extra/basename.lua index d814aa6..77fa168 100644 --- a/worldeditadditions_commands/commands/extra/basename.lua +++ b/worldeditadditions_commands/commands/extra/basename.lua @@ -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)