AFK Sleep

⭐ — (29 endorsements) 📥 9,367 downloads 📌 v1.3.2+mod 📅 2/27/2024
🟠 Updated over a year ago

By clo4 · datapack

⬇ Download Mod Source: Modrinth ↗ 📅 Updated: 3/30/2025 📅 Created: 2/27/2024
⚠️ Install Order · 2 steps
1🛠️ Forge — Minecraft Forge (mod loader) Download ↗
2🛠️ Fabric — Fabric Loader Download ↗

Install in this order, then this mod last — most mods fail to load without their framework and dependencies in place.

🔍 Analysis

  • 👍 0.3% endorsement rate
  • 🏆 #19 of 220 datapack mods in this game by downloads

📋 About This Mod

# AFK Sleep **Requires (https://modrinth.com/datapack/detect-afk)**. Allows players to sleep even when there are players AFK on the server, and respects your original `playersSleepingPercentage`. If you've got someone that joins then immediately leaves to take a shower, now that won't stop you from being able to skip the night. **Features** - **Configurable percentage** - Change the gamerule like you would normally - **Highly optimized** - No commands run unless necessary, no NBT usage, no checks every tick - **Reacts to changes** - Leaving, joining, changing AFK state, changing dimension, etc - **Works correctly** - Other data packs don't consider dimensions or state changes !(https://cdn.modrinth.com/data/hBJVFBHF/images/a555a85ba89158b0d992c7151b6d811a21493f16.jpeg) ## Details When AFK Sleep is first installed, it uses the `playersSleepingPercentage` you've set as the *percentage of non-AFK players in the overworld* that have to be sleeping to skip the night. The table below explains it: | Players | Not AFK | playersSleepingPercentage | Players required to sleep | | -------------- | --------------- | --------------------------------- | -------------------------------- | | 3 | 3 | 100% | **3** (all three players have to sleep) | | 3 | 2 | 100% | **2** (only the two non-afk players have to sleep) | | 3 | 2 | 50% | **1** (only half of the non-afk players have to sleep) | To change the percentage of "active" players that need to sleep, just change the gamerule like you normally would, with `/gamerule playersSleepingPercentage NUMBER`. This gamerule is managed for you, so don't worry if it isn't set to the value you expect. <details> <summary><strong>Before version 1.3:</strong> How to change playersSleepingPercentage</summary> Because this datapack overrides the `playersSleepingPercentage` gamerule, you have to modify a scoreboard value to change its calculations. Replace the number '50' with the percentage you want to set. ```mcfunction /scoreboard players set .relativePercentage afk_sleep.dummy 50 ``` </details> If you want to uninstall the datapack, run `/function afk_sleep:uninstall` to delete the backing scoreboards and reset the `playersSleepingPercentage` automatically.

# AFK Sleep

Requires (https://modrinth.com/datapack/detect-afk)**.

Allows players to sleep even when there are players AFK on the server, and respects your original `playersSleepingPercentage`. If you've got someone that joins then immediately leaves to take a shower, now that won't stop you from being able to skip the night.

Features

  • Configurable percentage - Change the gamerule like you would normally
  • Highly optimized - No commands run unless necessary, no NBT usage, no checks every tick
  • Reacts to changes - Leaving, joining, changing AFK state, changing dimension, etc
  • Works correctly* - Other data packs don't consider dimensions or state changes

!(https://cdn.modrinth.com/data/hBJVFBHF/images/a555a85ba89158b0d992c7151b6d811a21493f16.jpeg)

When AFK Sleep is first installed, it uses the `playersSleepingPercentage` you've set as the percentage of non-AFK players in the overworld* that have to be sleeping to skip the night. The table below explains it:

| Players | Not AFK | playersSleepingPercentage | Players required to sleep | | -------------- | --------------- | --------------------------------- | -------------------------------- | | 3 | 3 | 100% | 3 (all three players have to sleep) | | 3 | 2 | 100% | 2 (only the two non-afk players have to sleep) | | 3 | 2 | 50% | 1 (only half of the non-afk players have to sleep) |

To change the percentage of "active" players that need to sleep, just change the gamerule like you normally would, with `/gamerule playersSleepingPercentage NUMBER`. This gamerule is managed for you, so don't worry if it isn't set to the value you expect.

Before version 1. 3: How to change playersSleepingPercentage

Because this datapack overrides the `playersSleepingPercentage` gamerule, you have to modify a scoreboard value to change its calculations. Replace the number '50' with the percentage you want to set.

```mcfunction /scoreboard players set .relativePercentage afk_sleep.dummy 50 ```

If you want to uninstall the datapack, run `/function afk_sleep:uninstall` to delete the backing scoreboards and reset the `playersSleepingPercentage` automatically.

🤖 AI-enhanced — based on mod data

📊 Mod Details

Game
Minecraft Mods
Author
clo4
Version
1.3.2+mod
Downloads
9,367
Endorsements
29
Category
datapack
Created
2/27/2024
Updated
3/30/2025
Game Versions
1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4
Tags
game-mechanics, social, utility

🔧 How to Install Minecraft Mods Mods

Download from Modrinth. Use Prism Launcher or drop into your mods folder.

📖 Full step-by-step install guide for Minecraft Mods →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Minecraft Mods commands, item IDs, and more.

❓ Frequently Asked Questions

Which Minecraft Mods versions does AFK Sleep support?

The author lists 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5. Other versions may work but are untested by the author.

What is the latest version of AFK Sleep?

Version 1.3.2+mod, published 2025-03-30 with 9,367 downloads recorded at the source.

Keep browsing — more Minecraft Mods mods await

📋 All Minecraft Mods Mods 🏆 Top 25 📂 More datapack 👤 More by clo4 🔎 Similar Mods 🌐 Best datapack (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods