@@ -584,39 +584,45 @@ mc.listen('onChat', (player, msg) => {
584
584
* 尝试进服提示
585
585
*/
586
586
mc . listen ( 'onPreJoin' , ( player ) => {
587
- ( async ( ) => {
588
- const { realName, xuid } = player ;
589
- sendToAllEnableGroups (
590
- `[服务器] ${ realName } 正在尝试进入服务器,XUID:${ xuid } `
591
- ) ;
592
- } ) ( ) . catch ( throwError ) ;
587
+ if ( ! player . isSimulatedPlayer ( ) ) {
588
+ ( async ( ) => {
589
+ const { realName, xuid } = player ;
590
+ sendToAllEnableGroups (
591
+ `[服务器] ${ realName } 正在尝试进入服务器,XUID:${ xuid } `
592
+ ) ;
593
+ } ) ( ) . catch ( throwError ) ;
594
+ }
593
595
} ) ;
594
596
595
597
/**
596
598
* 进服提示
597
599
*/
598
600
mc . listen ( 'onJoin' , ( player ) => {
599
- ( async ( ) => {
600
- sendToAllEnableGroups ( `[服务器] 欢迎 ${ player . realName } 进入服务器` ) ;
601
- } ) ( ) . catch ( throwError ) ;
601
+ if ( ! player . isSimulatedPlayer ( ) ) {
602
+ ( async ( ) => {
603
+ sendToAllEnableGroups ( `[服务器] 欢迎 ${ player . realName } 进入服务器` ) ;
604
+ } ) ( ) . catch ( throwError ) ;
605
+ }
602
606
} ) ;
603
607
604
608
/**
605
609
* 退服提示
606
610
*/
607
611
mc . listen ( 'onLeft' , ( player ) => {
608
- const { realName } = player ;
609
- ( async ( ) => {
610
- sendToAllEnableGroups ( `[服务器] ${ realName } 退出了服务器` ) ;
611
- } ) ( ) . catch ( throwError ) ;
612
+ if ( ! player . isSimulatedPlayer ( ) ) {
613
+ const { realName } = player ;
614
+ ( async ( ) => {
615
+ sendToAllEnableGroups ( `[服务器] ${ realName } 退出了服务器` ) ;
616
+ } ) ( ) . catch ( throwError ) ;
617
+ }
612
618
} ) ;
613
619
614
620
mc . regConsoleCmd ( 'cqreconnect' , '手动重连GoCQHTTP' , ( ) => {
615
621
logger . info ( `${ conYellow } 正在尝试重连……` ) ;
616
622
return reconnectGoCQ ( ) ;
617
623
} ) ;
618
624
619
- ll . registerPlugin ( 'GoCQSync' , '依赖GoCQHTTP的群服互通' , [ 0 , 4 , 2 ] , {
625
+ ll . registerPlugin ( 'GoCQSync' , '依赖GoCQHTTP的群服互通' , [ 0 , 4 , 3 ] , {
620
626
Author : 'student_2333' ,
621
627
License : 'Apache-2.0' ,
622
628
} ) ;
0 commit comments