Fix mcl_util.get_color

This commit is contained in:
Elias Fleckenstein 2021-03-05 10:20:19 +01:00
parent 09671b7ac9
commit 2125c51c9c

View File

@ -409,9 +409,8 @@ end
function mcl_util.get_color(colorstr)
local mc_color = mcl_colors[colorstr:upper()]
if mc_color then
return mc_color
end
if #colorstr ~= 7 or colorstr:sub(1, 1) ~= "#"then
colorstr = mc_color
elseif #colorstr ~= 7 or colorstr:sub(1, 1) ~= "#"then
return
end
local hex = tonumber(colorstr:sub(2, 7), 16)