Skip to main content

welcome — the reference module

The smallest possible module, fully documented and fully tested, so every later module copies its pattern. Module 0.6 in the priority list; source in modules/welcome/.

What it does​

  • Shows the title Welcome to Shatterveil (moonlight + rose, aqua subtitle) once, when a player first spawns.
  • Sets the server-list MOTD.
  • Sets the server-list icon from src/main/resources/server-icon.png (64×64, rendered from images/shatterveil-emblem.svg with tools/render-server-icon.py). If the file is missing the module logs it and the server list simply shows no icon.

Manifest​

FieldValue
idwelcome
version0.1.0
security classSTANDARD — sends text only, reads nothing from clients
kernelno
dependenciesnone

Settings​

None. Colours are the Night palette from DECISIONS.md.

note

The module's README still says the colours are hard-coded "until the palette library exists". The palette library does exist now (stage B), but welcome hasn't been migrated onto it yet — its source still uses literal TextColor values. A small follow-up.

Commands​

None.

Events​

  • Listens: PlayerSpawnEvent (first spawn only), ServerListPingEvent.
  • Sends: nothing.

When disabled​

Players see no welcome title, and the server list falls back to Minestom's default MOTD with no icon. Nothing else changes; nobody needs to be told.

This is the module to use when trying the toggle flow for the first time:

/module disable welcome
/module enable welcome

Tests​

WelcomeModuleTest runs against a real Minestom test process (net.minestom:testing):

  • the toggle test: enable → disable → enable → disable, asserting after every disable that the module's event node is detached, no commands or tasks remain, and the context is closed;
  • the title is sent on first spawn while enabled and not after disable;
  • the ping carries the MOTD and a PNG favicon while enabled and not after disable.

Regenerating the icon​

python3 tools/render-server-icon.py images/shatterveil-emblem.svg \
modules/welcome/src/main/resources/server-icon.png