AutoAfkSleep
by johnflyiii
AutoAfkSleep, a Fabric client mod, makes an idle player sleep in a nearby bed at night and eat food when hunger drops.
What it does
When night falls, the mod looks for a bed within reach of the player and uses it, so a player who is away from the keyboard does not stay awake until morning. The bed must be within the interaction range of two blocks, and sleeping only works in the Overworld, since beds explode in other dimensions. A timing system checks more often as night approaches, which keeps the check cheap during the rest of the day.
Hunger is handled too. When food drops below a configurable threshold, the mod eats a food item without manual input. It prefers safe, non-magical food such as bread, meat and vegetables, and it skips rotten flesh, spider eyes and poisonous potatoes. Magical food like golden apples and enchanted items is kept for manual use. The mod also reads chat, answers direct messages and mentions that say the player is AFK, using a customizable reply with a 30-second cooldown, and can disconnect the player when a configured failure occurs.
The mod requires Fabric API and is published for Fabric only. Files cover 11 release versions 1.21 – 1.21.10, with 1.3.0 for 1.21.10 as the latest file. It is client-side only, so a server does not need it, and the code is open source under the Apache License 2.0.
Key features
Automatic night sleep
Detects nighttime and uses a bed within two blocks, only in the Overworld, so an idle player is not left awake.
Automatic eating
Eats when hunger falls below a configurable threshold, with a minimum food value filter and an option to include stews and soups.
Safe food selection
Chooses bread, meat and vegetables first and avoids poisonous items such as rotten flesh, spider eyes and poisonous potatoes.
Chat auto-response
Replies to direct messages and mentions with a customizable message and a built-in 30-second cooldown against spam.
Chat disconnect triggers
Watches chat for configured phrases and can disconnect the player when a failure action is set.
Gallery
Compatibility
Latest build for each game version and loader.
1.21.x11 of 11 versions with builds
Only full game releases are shown. This mod publishes no snapshot builds.
Requirements
Dependencies declared by the latest file for each loader.
Required 1
How it compares
AFK Auto Sleep is open source under the MIT License and supports Fabric and NeoForge for 1.21 – 1.21.10, with a client-side only environment. AFK Wave is client-side only and published for Fabric only, for 1.21.8 – 1.21.11, under the MIT License without open source status. Single Sleep Mod is server required with an optional client, for Fabric 1.21.8 only, and is open source under the MIT License.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| AutoAfkSleep | Fabric | 1.21 – 1.21.10 | Client-side only | 2025-10-09 |
| AFK Auto Sleep | Fabric and NeoForge | 1.21 – 1.21.10 | Client-side only | 2025-10-14 |
| AFK Wave | Fabric | 1.21.8 – 1.21.11 | Client-side only | 2026-06-10 |
| Single Sleep Mod | Fabric | 1.21.8 | Server required, client optional | 2025-08-03 |
Questions
Does AutoAfkSleep need Fabric API?
Does a server need AutoAfkSleep installed?
Which game versions does AutoAfkSleep cover?
In the catalog
AutoAfkSleep is one of 36,990 Utility mods on ModsFinder, and one of 25,772 Utility mods for Fabric. 15,569 mods support Minecraft 1.21.10.
Similar mods
What the author says
Never worry about surviving the night or starving while AFK again! This client-side mod automatically uses nearby beds when night falls and manages your hunger, keeping you safe and fed while you're away from your keyboard. 🛏️ Smart Auto-Sleep System - Automatically detects nighttime and attempts to sleep - Must be…
Official listing
- Modrinth page
- modrinth.com/mod/autoafksleep
- Owner
- johnflyiii
- Published
- 2025-08-04
- Updated on Modrinth
- 2025-10-09
- Facts verified
- 2026-10-15
