@@ -39,9 +39,10 @@ export function encodeConsoleColor(text) {
3939 term . TERM_TEXT_B = "\x1B[1m" ;
4040
4141 // 基本颜色
42- text = text . replace ( / ( [ A - Z a - z _ § & ; \- \\ . ] { 1 , } : ) / gim, "§6$1§r" ) ;
43- text = text . replace ( / I N F O / gm, term . TERM_TEXT_GREEN + "INFO" + term . TERM_NULL ) ;
44- text = text . replace ( / ( \d { 2 , } : \d { 2 , } : \d { 2 , } ) / gm, term . TERM_TEXT_CYAN + "$1" + term . TERM_NULL ) ;
42+ text = text . replace ( / \[ ( [ ^ [ \] ] + ) \] / gim, "[§1$1§r]" ) ;
43+ text = text . replace ( / ( [ A - Z a - z 0 - 9 _ § & ; \- \\ . ] { 1 , } : ) / gim, "§6$1§r" ) ;
44+ // text = text.replace(/INFO/gm, term.TERM_TEXT_GREEN + "INFO" + term.TERM_NULL);
45+ // text = text.replace(/(\d{2,}:\d{2,}:\d{2,})/gm, term.TERM_TEXT_CYAN + "$1" + term.TERM_NULL);
4546
4647 // Minecraft 原生颜色替代解析
4748 text = text . replace ( / § 0 / gm, term . TERM_TEXT_WHITE ) ;
@@ -119,14 +120,22 @@ export function encodeConsoleColor(text) {
119120 "\\)" ,
120121 "\\{" ,
121122 "\\}" ,
123+ '\\"' ,
122124 "<" ,
123125 ">" ,
124126 "Preparing start region for level"
125127 ] ,
126128 //红色
127129 [ "WARN" , "EULA" , "Error" , "Invalid" , "Stopping the server" , "Caused by" , "Stopping" ] ,
128130 //黄色
129- [ "Starting Minecraft server on" , "world_the_end" , "world_nether" , "Done" , "MCSMANAGER" ]
131+ [
132+ "Starting Minecraft server on" ,
133+ "world_the_end" ,
134+ "world_nether" ,
135+ "Done" ,
136+ "MCSMANAGER" ,
137+ "Server thread"
138+ ]
130139 ] ;
131140 for ( var k in RegExpStringArr ) {
132141 for ( var y in RegExpStringArr [ k ] ) {
0 commit comments