Back to mods
AFK Guard project artwork

Modrinth · Minecraft mod

AFK Guard

Automatic disconnect from game if damaged while AFK.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which AFK Guard release should I use?

Updated 6 days ago
Latest stable file 1.0.0
Game version 1.21.11
Loader Fabric

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.

Client Required
Dedicated server Not supported
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

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.

All 1 required mods have matching files

Install Fabric API first. We found matching files for this game-version and loader setup. 1 comes through another mod in the chain.

3 listed on this file 1 pulled in by one of those mods
Fabric API Needed by AFK Guard 1.0.0
required
Matching file found Matched file: 0.141.6+1.21.11
Cloth Config API Optional for AFK Guard 1.0.0
optional
Matching file found Matched file: 21.11.153+fabric
Mod Menu Optional for AFK Guard 1.0.0
optional
Matching file found Matched file: 17.0.0

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.

  1. 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.

  2. 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.

  3. 03

    Put it on the correct side

    It must be installed on the client. Do not install it on the dedicated server.

  4. 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.

4 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

AFK Guard versions and loaders

3 of 3 releases match

Looking for an older file? The official Modrinth project page is in Resources.