Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
AFK Guardian lets you walk away from your PC mid-game without coming back to a death screen. The moment something starts hurting your character while you're AFK, it grabs a screenshot, disconnects you from the server, and sends the screenshot straight to your phone over Telegram โ so a creeper, another player, lava, or starvation never quietly ends your session.
And it's two-way: from Telegram you can check your status, pull a live screenshot, or yank yourself off the server โ all from your phone, on any server you join.
๐ก๏ธ Client-side only. You install it on your client; nothing goes on the server. Works on every server you join โ no admin needed.
What it does
- AFK detection โ no keyboard/mouse input for a time you choose โ monitoring starts.
- Damage watch + auto-disconnect โ take damage while AFK and it captures a screenshot, leaves the server instantly, then uploads the shot. (Order is capture โ disconnect โ upload, so leaving is never blocked by the network.)
- Live screenshots to Telegram โ on danger, or any time you ask for one.
- Status updates โ health, hunger and coordinates when AFK starts and on a schedule you set.
- Hunger & disconnect alerts โ a heads-up when hunger runs low, and if the server drops you while you're away.
Control it from your phone
Message your bot from anywhere:
/statusโ health, hunger, position, AFK time/screenshotโ pull a live screenshot right now/leaveโ disconnect yourself from the server/idโ get your chat id (used during setup)/helpโ list the commands
Works with or without Telegram
Leave the bot token empty and you still get the auto-disconnect-on-damage safety net. Telegram only adds the alerts and remote control on top.
Setup (Telegram, ~2 minutes)
- In Telegram, message @BotFather, send
/newbot, and copy the bot token it gives you โ it's free. - In Minecraft, open Mods โ AFK Guardian โ Config (or edit
config/afkguardian-client.toml) and paste the token intotelegram.botToken. - Join a world and send your bot
/idโ it replies with your chat id. (You must be in-game for this.) Put that number intotelegram.chatId. - Done. Walk away for the AFK threshold (default 5 min) and you'll get the "AFK detected" message.
Settings you can tune
In the in-game config screen or the config file: AFK delay, the health-drop threshold that counts as danger, whether to attach a screenshot, the low-hunger alert level, periodic-update interval, and whether to auto-disconnect at all.
Honest limitations โ please read
- A burst kill (e.g. a sharp sword) can drop you from full to dead in under a second โ faster than any mod can react. This reliably saves you from mobs, lava, fall, drowning and starvation, and is a fast alert + partial defense against PvP โ not an invincibility cloak.
- Screenshots need the game to be rendering โ run Minecraft windowed or borderless while AFK. In exclusive fullscreen some GPUs stop updating the frame when the window isn't focused, which can produce a black or stale screenshot.
- Some PvP/anarchy servers treat an instant logout-on-damage as "combat logging" and may punish it โ turn auto-disconnect off on those servers and rely on the alerts instead.
Requirements
Minecraft 1.21.1 ยท NeoForge 21.1.x ยท client-side ยท MIT licensed.
๐ฌ Found a bug or have an idea? Open an issue on the source repo โ feedback very welcome.![The token can be put into the config file ]


