From 75ffa81b7e7ccec34fb3508340de079dc27070e0 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 28 Dec 2021 01:46:12 +0000 Subject: [PATCH] bonemeal: tidy up split_shell call --- worldeditadditions_commands/commands/bonemeal.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worldeditadditions_commands/commands/bonemeal.lua b/worldeditadditions_commands/commands/bonemeal.lua index cc4ba90..e4b8f67 100644 --- a/worldeditadditions_commands/commands/bonemeal.lua +++ b/worldeditadditions_commands/commands/bonemeal.lua @@ -1,4 +1,5 @@ local we_c = worldeditadditions_commands +local wea = worldeditadditions -- ██████ ██████ ███ ██ ███████ ███ ███ ███████ █████ ██ -- ██ ██ ██ ██ ████ ██ ██ ████ ████ ██ ██ ██ ██ @@ -15,14 +16,14 @@ worldedit.register_command("bonemeal", { params_text = "1" end - local parts = worldeditadditions.split_shell(params_text, "%s+", false) + local parts = wea.split_shell(params_text) local strength = 1 local chance = 1 local node_names = {} -- An empty table means all nodes if #parts >= 1 then - strength = tonumber(table.remove(parts, 1)) + strength = tonumber(wea.trim(table.remove(parts, 1))) if not strength then return false, "Invalid strength value (value must be an integer)" end