Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
AFK Sleep

AFK Sleep

Sleep while players are idle on your server · Works with custom player sleeping percentages · Handles dimensions, leaving, joining, ...

2,137
16
Game Mechanics
Social
Utility
AboutGalleryChangelogVersions

Version 1.3.2

by clo4 on Mar 30, 2025
Download

Version 1.3.2

by clo4 on Dec 23, 2024
Download

This version drops support for game versions before 1.21, which will give me a good baseline for any future features. I don't plan on introducing anything new any time soon.

This version also removes the debug logs that I left in. They don't do anything if you don't have a particular tag, but still add a very, very small amount of overhead. So I wanted to get a new release out for myself that doesn't contain them.

Version 1.3.1

by clo4 on Nov 11, 2024
Download

This is a patch release for 1.3 that drops support for older versions of the game. Both releases behave the same.

To recap the changes in 1.3:

  • Players in other dimensions are no longer counted toward the total number of players
  • Changing player conditions will now update the playersSleepingPercentage while players are trying to sleep
    • This means a player leaving and rejoining, or travelling to the nether, will now work correctly!
  • The "relative percentage" (percentage of online, non-AFK players in the same dimension) that have to sleep to pass the night can now be updated directly by changing the playersSleepingPercentage gamerule
    • I kept having to check my own documentation to remember what value had to change. This massively simplifies the experience and removes a big source of surprise.

Version 1.3

by clo4 on Nov 11, 2024
Download

This version is a massive internal refactor.

Fixes

  • Players in other dimensions are no longer counted toward the total number of players
  • Changing player conditions will now update the playersSleepingPercentage while players are trying to sleep
    • This means a player leaving and rejoining, or travelling to the nether, will now work correctly!
  • The "relative percentage" (percentage of online, non-AFK players in the same dimension) that have to sleep to pass the night can now be updated directly by changing the playersSleepingPercentage gamerule
    • I kept having to check my own documentation to remember what value had to change. This massively simplifies the experience and removes a big source of surprise.

Version 1.2.1

by clo4 on Jun 17, 2024
Download

Updated to include support for 1.21.0

v1.2 for 1.17 to 1.20.1

by clo4 on Mar 12, 2024
Download

Backported the datapack to 1.17, which is the first version of Minecraft that has the playersSleepingPercentage gamerule. This version of the pack is tecnically compatible later versions as well, but it's not as fast because function macros simplify the logic a lot.

Code for this version is on the afk-sleep-no-macros branch.

v1.2 for 1.20.2-1.20.4

by clo4 on Feb 28, 2024
Download
  • Added pack.png

Thankfully not many people have downloaded this so I don't feel bad doing a release for something so small :p

v1.1 for 1.20.2+

by clo4 on Feb 26, 2024
Download

First public release! 1.1 includes some improvements found in testing.

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+
Filter

Show all versions

Modrinth is open source.

main@656c5b6

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.