Compatibility
Minecraft: Java Edition
1.21โ1.21.1
Platforms
Tags
Creators
Details
Licensed ARR
Published 4 months ago
๐ค AFK Sleep
Sleep through the night with just 50% of players โ AFK players don't count!
โจ Features
- ๐ 50% sleep threshold โ Only half of active players need to sleep to skip the night
- ๐ถ AFK detection โ Players who haven't moved for 5 minutes are automatically marked as AFK and excluded from the sleep count
- ๐ฌ Chat notifications โ Players are informed when they go AFK, return, and when the night is skipped
- โ๏ธ Morning bonus โ Sleeping players get a small Regeneration effect as a reward
- โก Lightweight โ Pure datapack, no mods required, runs on vanilla 1.21.x
๐ฆ Installation
- Download the
.zipfile - Place it in your world's
datapacksfolder:
saves/<world_name>/datapacks/ - In-game run:
/reload - You should see:
[AFK Sleep] Datapack zaลadowany!
โ๏ธ How it works
| Situation | Result |
|---|---|
| 2/4 players sleeping, 0 AFK | Night skips โ |
| 1/4 sleeping, 2 AFK (2 active) | Night skips โ (1/2 active = 50%) |
| 1/4 sleeping, 0 AFK | Night continues โ |
| All players AFK | Nothing happens โ |
AFK is detected by checking if a player hasn't moved for 300 seconds (5 minutes).
๐ง Compatibility
- โ Minecraft Java Edition 1.21.x
- โ Works on multiplayer servers and single player
- โ Compatible with other datapacks
- โ Does not work on Bedrock Edition
๐ Notes
- Only Survival and Adventure mode players are counted
- Only players in the Overworld dimension are counted
- Creative/Spectator players are completely ignored
Made with โค๏ธ for vanilla Minecraft multiplayer servers


