
Modrinth · Minecraft mod
AFK Guard
Automatic disconnect from game if damaged while AFK.
Quick answer
Which AFK Guard release should I use?
AFK Guard 1.0.0 targets 1.21.11 with Fabric. It must be installed on the client. Do not install it on the dedicated server. All 1 required mods have matching files.
Where it goes
Is AFK Guard required on the client, server, or both?
It must be installed on the client. Do not install it on the dedicated server.
This file is marked client-only.
What else does AFK Guard 1.0.0 need?
1.0.0. Change the file and its required mods may change too.
Install Fabric API first. We found matching files for this game-version and loader setup. 1 comes through another mod in the chain.
1 extra mod was pulled in by another dependency. Indented rows show who needs each one. We only count dependency files that match this setup. A file for another loader does not fill the gap.
Before you install it
Add AFK Guard without breaking your instance.
Built for AFK Guard 1.0.0. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 1.0.0. It targets 1.21.11 with Fabric; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
Install Fabric API first. We found matching files for this game-version and loader setup. 1 comes through another mod in the chain.
- 03
Put it on the correct side
It must be installed on the client. Do not install it on the dedicated server.
- 04
Pick the file you checked
Use the “Get this file” button beside 1.0.0. It opens that exact file at the source.
About this project
What does AFK Guard add?
AFK Guard Mod
A client-side Fabric mod that protects you while you're AFK by automatically disconnecting if you take damage. AFK in peace.
Features
- AFK Protection: Automatically disconnects the client if you take damage while the guard is active.
- Auto-AFK: Automatically enables the guard after a configurable period of inactivity (default: 30 seconds).
- Configurable: Customize the delay, status messages, and damage sources.
- Ignore Player Damage: Option to ignore damage from other players (useful for preventing combat logging, can be disabled).
Usage
Keybinds
- Toggle AFK Guard: Manually enable/disable the guard. (Check your keybinds menu to set).
- Toggle Auto-AFK: Enable/disable the automatic AFK timer.
Commands
All commands start with /afkguard:
/afkguard config- View the current configuration./afkguard delay <seconds>- Set the inactivity time before Auto-AFK triggers./afkguard messages <true|false>- Toggle status messages on enable/disable./afkguard ignoreplayerdamage <true|false>- Choose whether damage from other players should trigger a disconnect.
Configuration
The config file is located at .minecraft/config/afkguard.json. You can edit it manually or use the in-game commands. Cloth config is also supported. I recommend using mod menu with cloth config api to configure the mod in-game.
Project description from Modrinth.
Pick your setup
AFK Guard by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
26.2
1 loader build26.1.1
1 loader build26.1
1 loader build1.21.11
1 loader buildCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
AFK Guard versions and loaders
1.1.0-beta.1
afkguard-1.1.0-beta.1.jar
24 Aug 2026
1.1.0-beta.1
afkguard-1.1.0-beta.1.jar
5 Apr 2026
1.0.0
afkguard-1.0.0.jar
5 Feb 2026
Looking for an older file? The official Modrinth project page is in Resources.