Detect AFK Players
by clo4
Detect AFK Players flags idle players on a server by checking their head rotation, then tags them as AFK after a set time.
What it does
The mod watches each player's head rotation through a data pack check, which runs once per player on a short interval. A player who keeps the same rotation for 3 minutes is tagged as AFK. The default is 3600 ticks, and the delay can be changed with a command. Players can also set their own AFK status manually, unless an administrator turns that off.
Because the check reads head rotation rather than movement, mouse and keyboard jiggers, water streams and similar automations do not count as activity, and attacks or explosions do not trigger false detections. Server operators use two provided function tags to react to AFK state. The mod is aimed at server owners and datapack authors who want a simple, accurate detection method.
The server needs the mod to run the detection, while a client may leave it out and still join. Files are published for Fabric, Forge, NeoForge and Quilt, with the latest build 1.2.2+mod for 1.21.8, dated 2025-07-26. Builds cover 1.18 – 1.21.8, and the code is released under the MIT License, so it is open source.
Key features
Head rotation detection
Activity is read from head rotation, so a player is not counted as active only because the mouse or keys are touched by a device.
Configurable AFK delay
The time before a player is tagged as AFK defaults to 3 minutes and can be changed with a server command.
Manual AFK toggle
Players can switch their own AFK status with a command, unless an administrator disables manual toggling.
Function tags for servers
Two function tags are provided so that other datapacks can run code when players become AFK or active again.
Gallery
Compatibility
Latest build for each game version and loader.
1.21.x9 of 9 versions with builds
1.20.x7 of 7 versions with builds
1.19.x5 of 5 versions with builds
1.18.x3 of 3 versions with builds
Only full game releases are shown. This mod publishes no snapshot builds.
Required by 4 mods
Use cases
Who it’s for: Server operators and datapack authors. Because the mod has no required client part, it suits servers with many players who should not need to install anything.
How it compares
Staple's AFK Display is server-side and client-optional, licensed under the Apache License 2.0 and not open source, with files for 1.18 – 1.21.8. Afk Plus is also server-side with optional client, under the MIT License and not open source, covering 1.18 – 26.1.1. Idler is server-side only and open source under the MIT License, but it targets 1.20.1 – 1.21.1 only. Detect AFK Players also runs with the server required and the client optional.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| Detect AFK Players | Fabric, Forge, NeoForge and Quilt | 1.18 – 1.21.8 | Server required, client optional | 2025-07-26 |
| Staple's AFK Display | Fabric, Forge, NeoForge and Quilt | 1.18 – 1.21.8 | Server required, client optional | 2025-09-07 |
| Afk Plus | Fabric, Forge, NeoForge and Quilt | 1.18 – 26.1.1 | Server required, client optional | 2026-04-05 |
| Idler | Fabric, Forge, NeoForge and Quilt | 1.20.1 – 1.21.1 | Server-side only | 2025-03-16 |
Questions
Does Detect AFK Players need to be on the client?
Which loaders does Detect AFK Players support?
Can the AFK delay be changed?
In the catalog
Detect AFK Players is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 17,695 mods support Minecraft 1.21.8.
More from clo4
Similar mods
What the author says
Detects player inactivity based on head rotation - simple, accurate, and fast. Intended as a dependency for datapacks and server operators. This doesn't do much without add-ons (better performance), so you'll probably want to download one of those too.
Official listing
- Modrinth page
- modrinth.com/mod/detect-afk
- Owner
- clo4
- Published
- 2023-07-11
- Updated on Modrinth
- 2025-07-26
- Facts verified
- 2026-10-15
