MCAlerts

MCAlerts

This plugin shows pikud haoref alerts in Israel inside minecraft with city selection and more

46 downloads

๐Ÿšจ 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.

No gallery available for this project.