1
0
Fork 0

Merge branch 'master' of https://git.minetest.land/MineClone2/MineClone2 into commands-refactoring-1

objects
AFCMS 2021-03-05 10:23:40 +01:00
commit 1f1f9f54a2
1 changed files with 2 additions and 3 deletions

View File

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