修改 - 颜色匹配规则

This commit is contained in:
suwings 2018-05-23 21:16:25 +08:00
parent 66e37158a4
commit d5189c84ad

View File

@ -111,8 +111,8 @@
//Minecraft 服务器输出基本颜色
TOOLS.encodeConsoleColor = function (text) {
text = text.replace(/([A-Za-z _&;-]{1,}:)/igm, "<span style='color:#ffa700;'>$1</span>");
text = text.replace(/\[/igm, "<span style='color:#e111e2;'><b>[&nbsp;</b></span>");
text = text.replace(/\]/igm, "<span style='color:#e111e2;'><b>&nbsp;]</b></span>");
text = text.replace(/\[/igm, "<span style='color:#10e616;'><b>[&nbsp;</b></span>");
text = text.replace(/\]/igm, "<span style='color:#10e616;'><b>&nbsp;]</b></span>");
text = text.replace(/INFO/gm, "<span style='color:#03ea0a;'>INFO</span>");
text = text.replace(/(\d{2,}:\d{2,}:\d{2,})/gm, "<span style='color:#017EBC;'> $1 </span>");
@ -129,7 +129,7 @@
"Preparing start region for level"
],
//红色
["WARN", "EULA", "Error", "Exception", "Stopping the server", "Caused by", "Stopping"],
["WARN", "EULA", "Error", "Invalid", "Stopping the server", "Caused by", "Stopping"],
//黄色
[
"Starting Minecraft server on",