HomeJavaModsCobblemon: AFK Guard
Cobblemon: AFK Guard
ModsJava

Cobblemon: AFK Guard

by MoustachStudio · on Modrinth

Cobblemon AFK Guard is a Fabric mod for Minecraft 1.21.1 servers that tracks player presence, marks inactive players as AFK, updates their tab name, and…

⬇ Download on Modrinth
Cobblemon: AFK Guard — screenshot 1Cobblemon: AFK Guard — screenshot 2

Logo

Cobblemon AFK Guard

Cobblemon AFK Guard is a Fabric mod for Minecraft 1.21.1 servers that tracks player presence, marks inactive players as AFK, updates their tab name, and can kick them after a configurable delay.

It is designed around Cobblemon gameplay and common server-side edge cases, so players are less likely to be kicked while they are actually using Cobblemon features.

Features

How it works

Server-only install

Server-only is fully supported.

The mod tracks movement, camera changes, chat, commands, normal interactions, inventory actions, merchant actions, and server-visible Cobblemon activity. This includes battle-related packets that reach the server during Cobblemon battles. This is the recommended baseline for most servers.

Server + client install

Installing the mod on both the server and the client enables enhanced activity reporting for client-heavy screens.

This improves AFK detection in interfaces such as Cobblemon battle screens, battle request screens, Cobblemon PC screens, and supported shop screens where some actions may not naturally reach the server as normal interaction packets. This is the best option if you want clicks on Fight, move buttons, Switch, and similar battle UI actions to reset AFK reliably.

Commands

Config

The config file is created at:

config/cobblemon_afk_guard.json

Important notes:

Default config:

{
  "idleThresholdSeconds": 240,
  "kickDelayAfterAfkSeconds": 300,
  "afkStartMessages": ["&e&o$player is now AFK.", "&e&o$player used Rest."],
  "broadcastAfkStart": true,
  "afkReturnMessages": [
    "&a&o$player is no longer AFK.",
    "&a&o$player woke up from Rest."
  ],
  "broadcastAfkReturn": true,
  "afkNameFormat": "&7[AFK] &r$player",
  "afkKickMessages": [
    "&fYou have been kicked for being AFK too long.",
    "&fYou have been kicked for being AFK too long. Snorlax won the nap battle."
  ],
  "countExemptPlayersInSleepVote": false
}

Installation

For Minecraft 1.21.1, required:

Optional compatibility:

Server install:

  1. Put the mod jar in the server mods folder.
  2. Start the server once to generate the config.
  3. Edit config/cobblemon_afk_guard.json.
  4. Run /afk refresh, or restart the server if you updated the mod jar itself.

Optional client install:

  1. Put the same mod jar in the client mods folder.
  2. Keep the mod on the server as usual.
  3. Join normally.

Installing on the client is optional, but recommended if you want the best detection inside Cobblemon battle menus and other modded screens.

Compatibility notes

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more