Repository navigation
feat(mod): 添加进退服及死亡播报冷却 - #20
Merged
zkhssb merged 4 commits intoOct 3, 2026
Merged
Conversation
- 为 Fabric、NeoForge 和 Forge 接入统一的播报冷却逻辑 - 添加进服、退服和死亡冷却配置,默认关闭 - 按玩家和事件类型计时,死亡播报进一步区分伤害类型 - 补充 README 配置说明
Ftimever
suggested changes
Oct 2, 2026
Ftimever
left a comment
Member
There was a problem hiding this comment.
类似bukkit,配合命令配置如/easybot config xxx
- 添加冷却配置查询与修改命令,沿用管理员权限并提供补全 - 校验整数及配置项,保存成功后即时生效,保存失败保留原值 - 保留未知配置字段,正常修改冷却时不重连 Bridge
Author
ok了 |
Ftimever
approved these changes
Oct 2, 2026
Contributor
|
解决一下冲突就可以合并了 |
保留上游消息过滤和权限配置,将冷却命令接入统一权限检查,并在保存时校验完整配置。
Author
ok了 |
zkhssb
approved these changes
Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
添加 /easybot config,可查看三个冷却项,指定配置项和秒数后保存并即时生效
配置命令默认权限等级为 3,接入统一命令开关、权限等级和 LuckPerms 节点 easybot.command.config,提供配置项和常用秒数补全
仅允许修改冷却项,校验整数范围;保存失败时保留原值,正常修改不重连 Bridge
在 sync 中添加 joinCooldownSeconds、quitCooldownSeconds 和 deathCooldownSeconds
为 Fabric、NeoForge 和 Forge 接入统一冷却逻辑
进服、退服按玩家 UUID 分别计时
死亡播报按玩家 UUID 和伤害类型分别计时
补充 README 配置示例及冷却规则说明
命令示例
省略秒数时查询单项;0 或负数关闭冷却。
问题原因
玩家频繁重连或重复死亡时,每次事件都会触发群播报,缺少 Mod 侧的冷却限制。
影响
验证
Fabric、NeoForge 1.21.1 实服验证命令权限、补全、整数边界、即时冷却及重载后持久化
配置损坏及文件锁导致写入失败时,文件和内存原值保持不变;未知字段保留
合并上游后验证 LuckPerms 授权与显式拒绝、命令开关和权限等级、客户端命令树及帮助可见性
冷却保存校验完整配置,拒绝无效过滤配置;保留消息过滤规则,普通聊天与手动转发均受过滤约束
:1.21-fabric:remapJar
:1.21-neoforge:shadowJar
:1.20.1-legacyforge:compileJava
:26.3-fabric:compileJava
:26.3-neoforge:compileJava
冷却到期、独立玩家和死因、并发及配置变更检查通过
Fabric、NeoForge 1.21.1 实服验证重复进退服、重复死亡、到期恢复和配置重载
验证关闭冷却及 skipOptions 优先级
冷却期间登录上报正常,被过滤的死亡仍正常发生并可重生
QQ 群测试分别收到预期的 2 条进服、2 条退服、3 条死亡播报,发送回执和群消息事件数量一致
git diff --check
测试说明
测试使用 Minecraft 1.21.1:
关联 issue
Refs easybot-team/easybot-issues#23
本 PR 仅实现播报冷却,不包含按群配置