? MCAlerts — Minecraft 实时以色列红色警报通知
再也不错过防空警报。 MCAlerts 将来自本土防卫司令部(pikud ha'oref)的火箭和导弹警报直接推送至你的 Minecraft 服务器——按城市分类着色,且在服务器重启后保持持久化。
专为不想在警报响起时切换窗口的以色列玩家和服务器管理员打造。完全支持希伯来语和英语双语。零游戏干扰。
? 功能概览
| 功能 |
详情 |
| ? 火箭/警报声通知 |
全屏标题 + 红色聊天信息 —— 仅针对受影响的特定城市 |
| ? 提前预警 |
黄色聊天信息(发送给所有人)+ 动作栏提示(仅你的城市) |
| ? 事件结束 |
绿色聊天广播给所有玩家 |
| ?️ 城市选择 GUI |
浏览并搜索所有以色列城市 |
| ? 双语支持 |
每位玩家可独立切换希伯来语或英语 |
| ? 持久历史记录 |
警报数据在服务器重启后依然保留(最多存储 200 条) |
| ? 全息投影 |
世界内使用 TextDisplay 实体显示最近的警报历史 |
| ? 社会安全系统 |
警报响起后出现可点击的“我没事”广播 |
| ? PlaceholderAPI |
将警报数据暴露给记分板、标签页列表等 |
? 警报系统 — 工作原理
MCAlerts 每秒轮询官方 pikud ha'oref API,并将每条警报分类为以下三种类型之一:
? SIREN 警报 —— 红色
火箭发射、敌机入侵、恐怖分子渗透、地震、红色警报
- ? 全屏标题:屏幕中央弹出
⚠ RUN TO SHELTER
- ? 红色聊天消息
[MCAlerts] Rocket Fire: Tel Aviv
- ? 紧急音效播放
- ? 仅限特定城市 —— 未设置受影响城市的玩家不会受到打扰
- ❤️ 安全检查:10 分钟后出现(社交系统,可选)
⚡ PREWARN 警报 —— 黄色
早期预警 —— 检测到发射,救命指令,距离避难还有几分钟
- ? 黄色聊天信息 → 发送给服务器上的 所有玩家(每个人都应该知道)
- ? ActionBar 通知 → 仅当你的城市在受影响区域时触发
- ? 匹配城市的玩家听到较柔和的提示音
✅ ENDED 警报 —— 绿色
事件结束(סיום האירוע)
- ? 绿色聊天信息 → 发送给 所有玩家,无需城市筛选
- 无声音,无标题 —— 仅是平静的确认信息
?️ 城市选择 GUI
运行 /mcalerts 打开城市选择器。
- 浏览从政府官方城市注册表中实时加载的约 1,200+ 个以色列城市
- 通过输入希伯来语或英语的城市名称进行 搜索
- 全局模式 —— 接收全国所有城市的警报(BEACON 图标)
- 随时 清除 你的选择(BARRIER 图标)
- 设置和城市选择在会话之间按玩家单独保存
? 双语支持
每位玩家可以在城市 GUI 中通过语言按钮(BOOK 图标)独立切换 希伯来语 和 英语。
| 希伯来语 |
英文翻译 |
| ירי רקטות וטילים |
Rocket Fire |
| חדירת כלי טיס עוין |
Hostile Aircraft Infiltration |
| חדירת מחבלים |
Terrorist Infiltration |
| סיום האירוע |
Incident Ended |
| התרעה מוקדמת - זיהוי שיגור |
Early Warning – Launch Detected |
| הנחיות מצילות חיים |
Life-Saving Instructions |
❤️ 社会安全系统
当玩家的所在城市触发警报后,10 分钟后聊天框中会出现一个 可点击的安全签到:
[MCAlerts] Are you safe? [YES, I'M SAFE]
点击它后会向全服广播一条消息,让每个人都知道你安然无恙。玩家可通过 GUI 中的 Sunflower 图标在每个账号上禁用此功能。
? 世界内全息投影
使用 TextDisplay 实体在世界中的任意位置放置一个实时警报面板。每当有新警报到达时,面板会自动更新,并按类型对每条记录进行颜色编码。
/mcalerts hologram create <id> — 在你当前位置放置
/mcalerts hologram delete <id> — 移除它
/mcalerts hologram list — 列出所有面板
全息投影显示最近 10 条警报,包含时间戳,并按 ??? 颜色编码,格式清晰易读。它们在服务器重启后依然持久存在。
? 持久警报历史
每条警报在接收到时会立即保存到 plugins/MCAlerts/alerts-history.json。服务器重启后,完整的历史记录会被恢复 —— 因此即使在重启后,/mcalerts testapi 也能正确显示过去一小时的警报计数。
磁盘上最多保留 200 条警报。
在聊天中查看近期历史:
/mcalerts history
? PlaceholderAPI 支持
MCAlerts 注册了一个标识符为 %mcalerts_*% 的 PAPI 扩展。
| 占位符 |
返回值 |
%mcalerts_last_title% |
最近一条警报的标题 |
%mcalerts_last_areas% |
最近一条警报的影响区域 |
%mcalerts_last_time% |
最近一条警报的时间戳 |
%mcalerts_history_1% |
第 1 条警报(最新)的完整格式化字符串 |
%mcalerts_history_N% |
第 N 条警报的完整格式化字符串 |
可在记分板、标签页列表、动作栏插件或任何兼容 PAPI 的插件中使用这些占位符。
⚙️ 命令
| 命令 |
权限 |
描述 |
/mcalerts |
— |
打开城市选择 GUI |
/mcalerts history |
— |
在聊天中查看最近 20 条警报 |
/mcalerts testapi |
— |
测试端点连接性及过去一小时摘要 |
/mcalerts test <type> |
mcalerts.test |
模拟测试警报(需确认) |
/mcalerts confirm |
mcalerts.confirm |
确认待处理的测试广播 |
/mcalerts clearhistory |
mcalerts.clear |
清除所有存储的警报历史 |
/mcalerts hologram <create|delete|list> [id] |
mcalerts.test |
管理世界内的警报面板 |
/mcalerts safe |
— |
广播你的安全状态(可点击按钮) |
? 测试警报类型
/mcalerts test rocket — 火箭发射 (SIREN, 红色)
/mcalerts test aircraft — 敌机 (SIREN, 红色)
/mcalerts test prewarn — 早期预警 (PREWARN, 黄色)
/mcalerts test warning — 救命指令 (PREWARN, 黄色)
/mcalerts test end — 事件结束 (ENDED, 绿色)
所有测试警报都需要在 30 秒内执行 /mcalerts confirm 作为安全确认。
?️ 配置
# config.yml
# 覆盖警报端点 — 如果你的服务器 IP 位于以色列境外,
# 并且被 oref.org.il 地理封锁(HTTP 403),这会很有用
alert-url: "https://www.oref.org.il/WarningMessages/alert/alerts.json"
# 玩家数据(自动管理,请勿手动编辑)
players:
<uuid>:
city: "תל אביב - יפו"
english: false
social: true
# 全息图位置(自动管理)
holograms:
main:
world: world
x: 0.0
y: 64.0
z: 0.0
? 地理封锁修复
oref.org.il 会阻止非以色列 IP 地址。如果你的服务器托管在以色列境外,你将看到 HTTP 403 错误。将 alert-url 设置为反向代理或自托管中继,以从以色列 IP 转发请求。
/mcalerts testapi
使用此命令来诊断连接性。它将准确告知你的服务器是被封锁、可访问,还是当前有活跃警报。
? 要求
- Paper / Purpur(推荐 1.21.X+,需要 TextDisplay API)
- Java 21+
- PlaceholderAPI (可选 — 启用
%mcalerts_*% 占位符)
- 能够访问
oref.org.il 或代理中继
⚠️ Spigot 可用,但全息图功能需要 Paper 的 Display Entity API。核心警报功能完全兼容。
?? 鸣谢
frqme — 首席开发者,此处所见的一切皆由其完成
pikud ha'oref (Home Front Command) — 本插件查询的公共 API。注意安全 ??
? 许可证
根据 MIT 许可证 发布。你可以使用它、分叉它、自托管它,做任何你想做的事——只是不要将其作为你自己的产品出售。
? MCAlerts 是一个社区安全工具。它依赖于以色列民防司令部官方 API,且未获得或以色列政府背书。
? MCAlerts — Real-Time Israeli Red Alert Notifications for Minecraft
Never miss a siren again. MCAlerts brings live Home Front Command (pikud ha'oref) rocket and missile alerts directly into your Minecraft server — color-coded, city-targeted, and persistent across restarts.
Built for Israeli players and server owners who don't want to alt-tab during an alert. Fully Hebrew & English bilingual. Zero gameplay interference.
? Features at a Glance
| Feature |
Details |
| ? Rocket/Siren Alerts |
Full-screen title + red chat — city-targeted only |
| ? Pre-Warnings |
Yellow chat (everyone) + actionbar (your city) |
| ? Incident Ended |
Green chat broadcast to all players |
| ?️ City Selection GUI |
Browse & search all Israeli cities |
| ? Bilingual |
Hebrew & English per-player toggle |
| ? Persistent History |
Alerts survive server restarts (up to 200 stored) |
| ? Holograms |
In-world TextDisplay boards with recent alert history |
| ? Social Safety System |
Clickable "I'm safe" broadcast after sirens |
| ? PlaceholderAPI |
Expose alert data to scoreboards, tab lists, etc. |
? Alert System — How It Works
MCAlerts polls the official pikud ha'oref API every second and classifies every alert into one of three categories:
? SIREN Alerts — Red
Rocket fire, hostile aircraft, terrorist infiltration, earthquake, Red Alert
- ? Full-screen title blasted in the middle of the screen with
⚠ RUN TO SHELTER
- ? Red chat message
[MCAlerts] Rocket Fire: Tel Aviv
- ? Urgent sound plays
- ? City-targeted only — players who haven't set their city to an affected area won't be disturbed
- ❤️ Safety check-in appears 10 minutes later (Social System, optional)
⚡ PREWARN Alerts — Yellow
Early warning – launch detected, life-saving instructions, minutes to shelter
- ? Yellow chat → sent to ALL players on the server (everyone should know)
- ? ActionBar notification → only if your city is in the affected zone
- ? Softer chime sound for city-matched players
✅ ENDED Alerts — Green
Incident ended (סיום האירוע)
- ? Green chat → sent to ALL players, no city targeting needed
- No sound, no title — just a calm confirmation
?️ City Selection GUI
Run /mcalerts to open the city picker.
- Browse all ~1,200+ Israeli cities loaded live from the government's official city registry
- Search by typing a city name in Hebrew or English
- Global mode — receive alerts for every city in the country (BEACON icon)
- Clear your selection at any time (BARRIER icon)
- Settings and city are saved per-player across sessions
? Bilingual Support
Each player can independently toggle between Hebrew and English via the Language button (BOOK icon) in the city GUI.
| Hebrew |
English Translation |
| ירי רקטות וטילים |
Rocket Fire |
| חדירת כלי טיס עוין |
Hostile Aircraft Infiltration |
| חדירת מחבלים |
Terrorist Infiltration |
| סיום האירוע |
Incident Ended |
| התרעה מוקדמת - זיהוי שיגור |
Early Warning – Launch Detected |
| הנחיות מצילות חיים |
Life-Saving Instructions |
❤️ Social Safety System
When a siren alert fires for a player's city, a clickable safety check-in appears in chat 10 minutes later:
[MCAlerts] Are you safe? [YES, I'M SAFE]
Clicking it broadcasts a server-wide message so everyone knows you're okay. Players can disable this feature per-account via the Sunflower icon in the GUI.
? In-World Holograms
Place a live alert board anywhere in your world using TextDisplay entities. Boards auto-update whenever a new alert arrives and color-code each entry by type.
/mcalerts hologram create <id> — place at your location
/mcalerts hologram delete <id> — remove it
/mcalerts hologram list — list all boards
Holograms display the last 10 alerts with timestamps, color-coded ??? and formatted for readability. They persist across server restarts.
? Persistent Alert History
Every alert is saved to plugins/MCAlerts/alerts-history.json immediately when received. On server restart, the full history is restored — so /mcalerts testapi will correctly show last-hour alert counts even after a reboot.
Up to 200 alerts are retained on disk.
View recent history in chat:
/mcalerts history
? PlaceholderAPI Support
MCAlerts registers a PAPI expansion with the identifier %mcalerts_*%.
| Placeholder |
Returns |
%mcalerts_last_title% |
Title of the most recent alert |
%mcalerts_last_areas% |
Affected areas of the most recent alert |
%mcalerts_last_time% |
Timestamp of the most recent alert |
%mcalerts_history_1% |
Full formatted string for alert #1 (newest) |
%mcalerts_history_N% |
Full formatted string for alert #N |
Use these in scoreboards, tab lists, action bar plugins, or any PAPI-compatible plugin.
⚙️ Commands
| Command |
Permission |
Description |
/mcalerts |
— |
Open city selection GUI |
/mcalerts history |
— |
View last 20 alerts in chat |
/mcalerts testapi |
— |
Test endpoint connectivity & last-hour summary |
/mcalerts test <type> |
mcalerts.test |
Stage a test alert (requires confirm) |
/mcalerts confirm |
mcalerts.confirm |
Confirm a pending test broadcast |
/mcalerts clearhistory |
mcalerts.clear |
Wipe all stored alert history |
/mcalerts hologram <create|delete|list> [id] |
mcalerts.test |
Manage in-world alert boards |
/mcalerts safe |
— |
Broadcast your safety status (clickable button) |
? Test Alert Types
/mcalerts test rocket — Rocket fire (SIREN, red)
/mcalerts test aircraft — Hostile aircraft (SIREN, red)
/mcalerts test prewarn — Early warning (PREWARN, yellow)
/mcalerts test warning — Life-saving instructions (PREWARN, yellow)
/mcalerts test end — Incident ended (ENDED, green)
All test alerts require /mcalerts confirm within 30 seconds as a safety gate.
?️ Configuration
# config.yml
# Override the alert endpoint — useful if your server IP is outside Israel
# and gets geo-blocked by oref.org.il (HTTP 403)
alert-url: "https://www.oref.org.il/WarningMessages/alert/alerts.json"
# Player data (auto-managed, do not edit manually)
players:
<uuid>:
city: "תל אביב - יפו"
english: false
social: true
# Hologram locations (auto-managed)
holograms:
main:
world: world
x: 0.0
y: 64.0
z: 0.0
? Geo-Block Fix
oref.org.il blocks non-Israeli IP addresses. If your server is hosted outside Israel, you'll see HTTP 403 errors. Set alert-url to a reverse proxy or a self-hosted relay that forwards requests from an Israeli IP.
/mcalerts testapi
Use this command to diagnose connectivity. It will tell you exactly whether your server is blocked, reachable, or if there's an active alert right now.
? Requirements
- Paper / Purpur (1.21.X+ recommended, requires TextDisplay API)
- Java 21+
- PlaceholderAPI (optional — enables
%mcalerts_*% placeholders)
- Network access to
oref.org.il or a proxy relay
⚠️ Spigot works but hologram features require Paper's Display Entity API. Core alert functionality is fully compatible.
?? Credits
frqme — Lead developer, everything you see here
pikud ha'oref (Home Front Command) — The public API this plugin queries. Stay safe ??
? License
Released under the MIT License. Use it, fork it, self-host it, do whatever you want — just don't sell it as your own.
? MCAlerts is a community safety tool. It relies on the official Israeli Home Front Command API and is not affiliated with or endorsed by the Israeli government.
评论 0
登录后参与评分
还没有评论,来抢沙发吧