Crusalis CapPinger
一个轻量级的客户端 Fabric 模组,用于监听聊天中的战争警报,并发送带有实时地图图片的精美 Discord 嵌入消息,以便你的团队能够立即做出反应。
更新:它在 Crusalis 上现已过时。
功能说明
-
检测战争消息,例如:
"[War] <player> is attacking <town> at (x, y, z)"
"[War] <player> captured chunk (cx, cz) from <town>"
"[War] <player> captured territory (id=ID) from <town>"
-
发送包含以下信息的 Discord 嵌入消息:
- 攻击者名称
- 目标城镇
- 坐标
- 时间戳
- 生成的地图图片,显示带有 Dynmap 国家颜色的攻击位置
-
针对不同事件采用不同的嵌入样式:
- Chunk Attacked(区块被攻击) - 红色,用于正在进行的攻击
- Chunk Captured(区块被占领) - 橙色,用于区块被夺取时
- Territory Captured(领土被占领) - 紫色,带有条纹可视化以显示攻击者与防守者
无需命令,也无需服务器插件——只需将其放入你的客户端即可。
配置(Cloth Config)
打开 Mods → Crusalis Cap Pinger → Config(Mod Menu),然后:
- Discord Webhook URL — 粘贴你的频道 Webhook。
- Broadcast All(广播全部)(默认开启)— 转发所有匹配到的警报。
- Target Names(目标名称) — 当 Broadcast 关闭时,仅当目标与这些名称之一匹配时才发送(精确匹配,不区分大小写)。
- Ping Role ID(可选) — 粘贴一个 Discord 角色 ID 以 @mention 你的防御小队。
设置保存在本地;你可以随时在游戏中更改它们。
工作原理
该模组在 Fabric 1.21.7-1.21.8 上监听客户端消息事件,解析每一行文本,匹配 [War] 消息的正则表达式模式,如果符合你的配置,则从 Dynmap 数据生成地图图片并向 Discord 发送嵌入消息。地图生成在后台线程运行,因此不会影响 FPS。
要求
- Minecraft 1.21.7 或 1.21.8
- Fabric Loader + Fabric API
- Cloth Config
- Mod Menu(用于配置按钮)
安装
- 安装 Fabric Loader 和 Fabric API。
- 将 Crusalis CapPinger 放入
mods/ 文件夹。
- 添加 Mod Menu 和 Cloth Config。
- 启动游戏 → Mods → Crusalis Cap Pinger → Config → 粘贴 webhook。
- 保持 Broadcast All 开启,或者如果你只关心某些城镇,请添加 Target Names。
- (可选)添加 Role ID 以 ping 特定角色。
一旦战争警报出现在聊天中,你就上线了。
地图图片
每条警报都包含一张自动生成的地图,显示:
- 使用实际 Dynmap 颜色的国家领土
- 参考用的区块网格叠加层
- 蓝色海洋背景
- 高亮显示的受攻击/被占领的区块或领土
- 领土占领显示条纹以指示攻击者与防守者
隐私与安全
- 该模组在本地读取传入的聊天内容以查找警报。
- 它仅将匹配的战争警报发送到你的 webhook。
- 你的 webhook URL 保留在你的电脑上。
- Dynmap 数据是从公开的 Crusalis 地图 API 获取的。
过滤行为
- Broadcast All = ON: 所有匹配的
[War] 消息都会发送到 Discord。
- Broadcast All = OFF: 仅当解析出的目标等于你的 Target Names 之一(不区分大小写)时才发送。
兼容性
- 仅限客户端。不需要服务器权限。
- 可与优化模组(如 Sodium)一起使用。
- 不修改游戏玩法——仅监听消息并发布 webhook。
整合包与服务器政策
- 允许用于整合包。
- 适合仅客户端使用(它不会自动化游戏玩法,只是中继你已经可以看到的警报)。
总结
粘贴 webhook → 选择 Broadcast All 或目标 → (可选)角色 ping → 完成。
Crusalis CapPinger 在战争事件发生时,为你的团队提供快速、清晰的 Discord 警报及地图图片。
特别感谢:
oreotrollturbo 提供了他来自 Crusalis Utils 的原始 dynmap 获取代码。
Crusalis CapPinger
A tiny, client-side Fabric mod that watches your chat for war alerts and fires a clean Discord embed with a live map image so your team can react instantly.
Update: It is now outdated on Crusalis.
What it does
-
Detects war messages like:
"[War] <player> is attacking <town> at (x, y, z)"
"[War] <player> captured chunk (cx, cz) from <town>"
"[War] <player> captured territory (id=ID) from <town>"
-
Sends a Discord embed with:
- Attacker name
- Target town
- Coordinates
- Timestamp
- A generated map image showing the attack location with nation colors from Dynmap
-
Different embed styles for different events:
- Chunk Attacked - Red, for ongoing attacks
- Chunk Captured - Orange, for when a chunk is taken
- Territory Captured - Purple, with a striped visualization showing attacker vs defender
No commands, no server plugin required—just drop it in your client.
Configuration (Cloth Config)
Open Mods → Crusalis Cap Pinger → Config (Mod Menu), then:
- Discord Webhook URL — paste your channel webhook.
- Broadcast All (default ON) — forward every matching alert.
- Target Names — when Broadcast is OFF, only send if the target matches one of these names (exact match, case-insensitive).
- Ping Role ID (optional) — paste a Discord Role ID to @mention your defense squad.
Settings are saved locally; you can change them in-game anytime.
How it works
The mod listens to client message events on Fabric 1.21.7-1.21.8, parses each line, matches regex patterns for [War] messages, and—if allowed by your config—generates a map image from Dynmap data and POSTs a Discord embed. Map generation runs on a background thread so there's no FPS impact.
Requirements
- Minecraft 1.21.7 or 1.21.8
- Fabric Loader + Fabric API
- Cloth Config
- Mod Menu (for the config button)
Installation
- Install Fabric Loader and Fabric API.
- Drop Crusalis CapPinger into
mods/.
- Add Mod Menu and Cloth Config.
- Launch → Mods → Crusalis Cap Pinger → Config → paste webhook.
- Keep Broadcast All ON or add Target Names if you only care about certain towns.
- (Optional) Add Role ID to ping a specific role.
You're live the moment a war alert hits chat.
The Map Image
Each alert includes an auto-generated map showing:
- Nation territories in their actual Dynmap colors
- Chunk grid overlay for reference
- Blue ocean background
- The attacked/captured chunk or territory highlighted
- Territory captures show stripes to indicate attacker vs defender
Privacy & Safety
- The mod reads incoming chat locally to find alerts.
- It only sends matched war alerts to your webhook.
- Your webhook URL stays on your PC.
- Dynmap data is fetched from the public Crusalis map API.
Filtering behavior
- Broadcast All = ON: every matching
[War] message goes to Discord.
- Broadcast All = OFF: only send if the parsed target equals one of your Target Names (case-insensitive).
Compatibility
- Client-side only. No server permissions required.
- Works alongside optimization mods (Sodium, etc.).
- Doesn't modify gameplay—just listens for messages and posts webhooks.
Modpack & server policy
- Allowed in modpacks.
- Safe for client-only use (it doesn't automate gameplay, just relays alerts you can already see).
Summary
Paste webhook → choose Broadcast All or targets → (optional) role ping → done.
Crusalis CapPinger gives your team fast, clean Discord alerts with map images the moment a war event happens.
Special thanks to:
oreotrollturbo for providing me his original dynmap fetcher code from Crusalis Utils.
评论 0
登录后参与评分
还没有评论,来抢沙发吧