Wiki 9Minecraft Wiki 9Minecraft

How to Pause the Sky Cycle When Online Players Are AFK

Normally, the server only halts the daylight and weather timers when the online player count drops to zero. If a player walks away from their computer while staying logged in, the sun and day counter would normally keep advancing. You can prevent a single idle player from running up the world's day count by enabling AFK detection.

Setting Up AFK Player Detection

The Pause Server When Empty Data Pack includes built-in support for the AFK Display pack, allowing it to treat inactive players as if they were logged off.

1. Place both the Pause Server When Empty Data Pack and the AFK Display pack into your world save's datapacks folder.

2. Run /reload in the server console or in-game chat if the server is already running.

3. Open the chat and run /function pause_server_when_empty:config to bring up the options menu, where you can check or adjust your settings.

4. When all players currently online remain still long enough to be marked as inactive by AFK Display, the data pack counts them as offline.

5. Once every online player is either disconnected or marked AFK, the daylight cycle and weather timer pause automatically until someone returns and moves.

Join 9Minecraft News & Guides