From b891a13787b356fdbbaee8295bf7a421b2b7604b Mon Sep 17 00:00:00 2001 From: AFCMS Date: Mon, 12 Apr 2021 15:48:13 +0200 Subject: [PATCH] try to fix pattern --- mods/CORE/mcl_commands/api.lua | 2 +- mods/MISC/mcl_basic_commands/bossbar.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/CORE/mcl_commands/api.lua b/mods/CORE/mcl_commands/api.lua index 32fd12c037..39a7d3b2b6 100644 --- a/mods/CORE/mcl_commands/api.lua +++ b/mods/CORE/mcl_commands/api.lua @@ -52,7 +52,7 @@ mcl_commands.types = { return S("Word is invalid!") end end}, - quotestring = {'["]+(.+)["]+', + quotestring = {'"+(.-)"+', function(res, pointer) if res[pointer] == tostring(res[pointer]) then return nil, string.sub(tostring(res[pointer]), 2, #res[pointer]-1), pointer+1 diff --git a/mods/MISC/mcl_basic_commands/bossbar.lua b/mods/MISC/mcl_basic_commands/bossbar.lua index 2902055fd5..9886c59c4f 100644 --- a/mods/MISC/mcl_basic_commands/bossbar.lua +++ b/mods/MISC/mcl_basic_commands/bossbar.lua @@ -14,7 +14,7 @@ end --TODO: toggle it with setting/mod mcl_commands.register_command("bossbar", { func = function(cmd) - cmd:sub("add :id: :string:word", { + cmd:sub("add :id: :string:quotestring", { func = function(name, id, string) mcl_commands.bossbar.registered_dynamic[id] = {text=string, color="white", percentage=100, players=nil} --set percentage to 0 return true, "Super"