Skip to main content
poplock_datapack.zip provides a single Minecraft function — poplock:alert — that plays a sound alert to all online players simultaneously. The snapshot script calls this function at each countdown interval before stopping the server for a daily snapshot.

Countdown intervals

When the server is online at snapshot time, snapshot.sh broadcasts a message and triggers poplock:alert at the following intervals before shutdown: The datapack function is used instead of a direct playsound command so that the per-player command feedback messages are suppressed in chat.

Installation

1

Download the datapack

The world/datapacks/ directory is created by the server on its first run. If you are installing the datapack before the server has launched for the first time, create the directory manually first:
2

Activate the datapack from the server console

Once the server is running, enable the datapack once:
The datapack loads automatically on every subsequent server restart — this command only needs to be run once.

Updating the datapack

If Minecraft updates to a new version that changes the required pack format number, the datapack may stop loading and snapshot.sh will log errors when trying to call poplock:alert.
1

Re-download the datapack

2

Reload datapacks without restarting

From the server console (attach with serv console):
If you see Unknown function poplock:alert in the snapshot log, the pack format number declared in pack.mcmeta inside the zip does not match your server version. To find the correct format number, run version in the server console, look up the corresponding pack format for that Minecraft release, then rebuild the datapack zip with the matching value in pack.mcmeta and re-download it.