Skip to content

Commit 6d129cc

Browse files
committed
update
1 parent a3b8b9c commit 6d129cc

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

Diff for: GoCQSync/GoCQSync.lxl.js

+20-14
Original file line numberDiff line numberDiff line change
@@ -584,39 +584,45 @@ mc.listen('onChat', (player, msg) => {
584584
* 尝试进服提示
585585
*/
586586
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+
}
593595
});
594596

595597
/**
596598
* 进服提示
597599
*/
598600
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+
}
602606
});
603607

604608
/**
605609
* 退服提示
606610
*/
607611
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+
}
612618
});
613619

614620
mc.regConsoleCmd('cqreconnect', '手动重连GoCQHTTP', () => {
615621
logger.info(`${conYellow}正在尝试重连……`);
616622
return reconnectGoCQ();
617623
});
618624

619-
ll.registerPlugin('GoCQSync', '依赖GoCQHTTP的群服互通', [0, 4, 2], {
625+
ll.registerPlugin('GoCQSync', '依赖GoCQHTTP的群服互通', [0, 4, 3], {
620626
Author: 'student_2333',
621627
License: 'Apache-2.0',
622628
});

Diff for: GoCQSync/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,7 @@ QQ:3076823485
167167
- 修复`cmd_prefix`长度大于 1 时出现的问题
168168
- 0.4.2
169169
- 添加配置项`allow_cmd`
170+
- 0.4.3
171+
- 不提示模拟玩家进退服
170172

171173
## 文档待完善 (\*σ´∀`)σ

0 commit comments

Comments
 (0)