Skip to content

For Developers

fj_goncalves edited this page Sep 11, 2026 · 1 revision

Building

Requires JDK 21.

./gradlew build

The compiled jar is written to build/libs/alertmod-1.0.0.jar.

Running a dev client

./gradlew runClient

Project layout

Package Contents
com.alertmod Mod entry point (AlertMod), sound registration (ModSounds)
com.alertmod.command The /alert command
com.alertmod.network The three network payloads and their registration (AlertPayloads)
com.alertmod.client The alert screen (AlertScreen), the on-screen banner renderer (AlertOverlay), and the client-side packet handlers

How an alert travels

  1. /alert → server sends OpenAlertGuiPayload to the player who ran it.
  2. The client opens AlertScreen and, on submit, sends AlertRequestPayload back to the server.
  3. The server checks permission, then sends ShowAlertPayload to every targeted player.
  4. Each client's AlertOverlay picks that up and renders the banner during the next RenderGuiEvent.Post.

Translations

Language files live in src/main/resources/assets/alertmod/lang/. To add a language, copy en_us.json to <locale>.json (e.g. es_es.json) and translate the values — the keys must stay identical.

License

MIT — see LICENSE.

Clone this wiki locally