forked from VoxeLibre/VoxeLibre
try to fix pattern
This commit is contained in:
parent
0c32c94f73
commit
b891a13787
|
@ -52,7 +52,7 @@ mcl_commands.types = {
|
||||||
return S("Word is invalid!")
|
return S("Word is invalid!")
|
||||||
end
|
end
|
||||||
end},
|
end},
|
||||||
quotestring = {'["]+(.+)["]+',
|
quotestring = {'"+(.-)"+',
|
||||||
function(res, pointer)
|
function(res, pointer)
|
||||||
if res[pointer] == tostring(res[pointer]) then
|
if res[pointer] == tostring(res[pointer]) then
|
||||||
return nil, string.sub(tostring(res[pointer]), 2, #res[pointer]-1), pointer+1
|
return nil, string.sub(tostring(res[pointer]), 2, #res[pointer]-1), pointer+1
|
||||||
|
|
|
@ -14,7 +14,7 @@ end
|
||||||
--TODO: toggle it with setting/mod
|
--TODO: toggle it with setting/mod
|
||||||
mcl_commands.register_command("bossbar", {
|
mcl_commands.register_command("bossbar", {
|
||||||
func = function(cmd)
|
func = function(cmd)
|
||||||
cmd:sub("add :id: :string:word", {
|
cmd:sub("add :id: :string:quotestring", {
|
||||||
func = function(name, id, string)
|
func = function(name, id, string)
|
||||||
mcl_commands.bossbar.registered_dynamic[id] = {text=string, color="white", percentage=100, players=nil} --set percentage to 0
|
mcl_commands.bossbar.registered_dynamic[id] = {text=string, color="white", percentage=100, players=nil} --set percentage to 0
|
||||||
return true, "Super"
|
return true, "Super"
|
||||||
|
|
Loading…
Reference in New Issue