AfkGuard
Knows the difference between AFK and a macro
AfkGuard is AFK handling for Paper 1.21.x that knows the difference between a player who stepped away and a player running a macro to look busy.
WHY AFKGUARD
- It catches the macros. A timer-based plugin is beaten by anything that jiggles the mouse. This one looks for repeating movement cycles over a window you configure, so an AFK pool and a movement macro get flagged as what they are
- It does not flag real players. Packet jitter and head-twitching are ignored, so somebody reading chat is not kicked as idle
- Your farms keep running. AFK players are taken out of the natural spawn count, so an idle crowd at spawn stops starving everybody else's mob farms
- Going AFK is polite, not silent. A player can say why — dinner, work, a call — and that reason shows in chat, in the list, in the tab menu and on your scoreboard
- Ranks can idle longer. Five minutes by default, more for the tiers you choose, all through permissions
WHAT YOU GET
- Real inactivity detection — not a movement timer
- Anti-macro guard — repeating movement cycles are flagged, with the detection window and the threshold in your hands
- AFK reasons — an optional note that travels to chat, the AFK list, the tab menu and your placeholders
- Timeouts by permission — five minutes by default, ten and twenty for the ranks you set, and an exemption node for staff
- Auto-kick with a countdown — warnings before the boot, all configurable, or no kick at all
- AFK safe zone — idle players are moved to a point you anchor in game, fed and left invulnerable while they are there
- Mob-cap exclusion — AFK players stop counting towards natural spawns
- AFK list — who is away and why, in one command
- PlaceholderAPI — AFK status, the reason and the time away, for scoreboards, TAB or chat
- English and Spanish included, and every string a player reads lives in messages.yml in MiniMessage format
HOW IT WORKS IN PLAYA player types [ICODE]/afk dinner[/ICODE] and the reason appears next to their name for everybody. Another one leaves a macro running in a water pool to farm time; the cycle repeats, the guard flags it, and they get the countdown and the boot you configured. Meanwhile the twenty idle players at spawn have stopped counting towards the mob cap, so the iron farm on the other side of the map is producing again.CONFIGURATION
- config.yml — idle timeout, the anti-macro window and threshold, kick behaviour and warnings, the safe zone, mob-cap exclusion and which integrations are on, every key with a comment beside it
- messages.yml — every string a player reads, so you can reword or re-colour the plugin without touching anything else