新增 - 颜色匹配规则

This commit is contained in:
suwings 2018-05-28 10:54:53 +08:00
parent 6e4989bae6
commit d94e4ced82

View File

@ -110,7 +110,7 @@
//Minecraft 服务器输出基本颜色
TOOLS.encodeConsoleColor = function (text) {
text = text.replace(/([A-Za-z _&;-]{1,}:)/igm, "<span style='color:#ffa700;'>$1</span>");
text = text.replace(/([A-Za-z _&;-\\.]{1,}:)/igm, "<span style='color:#ffa700;'>$1</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>");
@ -120,6 +120,7 @@
//蓝色
["Unknown command", "Loading libraries, please wait...",
"Loading", "Loaded", "\\d{1,3}%", "true", "false",
"plugin.yml"
],
//绿色
["/help", "left the game", "Enabling",