Repository navigation
How AFK works
A player in AFK mode is safe: nothing hurts or moves them, and mobs leave them alone. The protection can’t be used to gain anything, and it ends the moment the player does something.
A player goes AFK in one of two ways:
-
/afk [reason]. Others see the reason in the broadcast.manual.enabledturns the command off, andmanual.reason_lengthcuts long reasons (64 characters by default). -
Idling. After
auto.seconds(five minutes) without activity, the plugin puts the player into AFK mode itself.auto.enabledturns this off.
The plugin refuses AFK when the protection would save a player from danger they’re already in:
- in a fight: within
anti_abuse.combat_seconds(15) of taking damage or hitting a mob or player; - falling or gliding;
- on fire or freezing;
- in water or lava;
- with a mob within 32 blocks after them.
/afk tells the player why. An idle player waits until the danger is over and then goes AFK. Each check has a switch under anti_abuse.
Each row is a switch under protection or gains in Configuration.
| Switch | While AFK |
|---|---|
damage |
No damage of any kind but /kill: attacks, PvP, explosions, fire, lava, falls, drowning, freezing, magic, poison, wither, the world border. The player doesn’t catch fire, and their air doesn’t run out under water |
void |
A fall into the void takes the player back to where they went AFK, and they stay AFK |
knockback |
Hits, explosions, wind charges, and shields don’t push them |
collision |
Mobs and players walk through them |
projectiles |
Arrows, tridents, snowballs, ender pearls, wind charges, and fishing hooks fly through them. A rod that hooked them earlier can’t reel them in |
effects |
Harmful potion effects don’t stick, unless a command gives them. Good effects stay |
hunger |
Hunger stays where it was, and so does health: no drain, no healing from a full bar. Potions, beacons, and Regeneration still heal |
mobs |
No mob targets them. Wardens, endermen, and zombified piglins don’t get angry at them, and phantoms don’t spawn for them. Mobs within 32 blocks drop them as a target |
vehicles |
Boats and minecarts can’t pick them up or push them |
raids |
Bad Omen doesn’t start a raid while they stand in a village |
vibrations |
Sculk sensors, shriekers, and wardens don’t hear them |
gains.items (off) |
Items, arrows, and tridents stay on the ground |
gains.experience (off) |
Experience orbs wait for them |
Pistons still move an AFK player, so an AFK player never jams a machine. AFK farms keep spawning mobs, and vanilla statistics, play time included, keep counting.
With sleep_ignored on, AFK players don’t count when the server checks whether everyone sleeps. On a server where everyone has to sleep, one friend away from the keyboard no longer keeps the night going.
A player comes back the moment they act. Each kind of activity is a switch under exit_triggers, and each also restarts the idle timer:
- the movement keys, jumping, sneaking, and sprinting;
- turning the camera by more than
look_degrees(30) from where it pointed when AFK began, or at the last activity; - chatting, and any command but
/afkand/moafks; - attacking, clicking a block, an entity, or the air;
- breaking or placing a block;
- opening a container or clicking in an inventory;
- dropping an item, swapping hands, or changing the held slot.
The plugin watches the keys a player presses, not where they are. Water, pistons, and minecarts moving a player never count, so an AFK pool doesn’t keep anyone awake.
On return, the player’s fall distance and freezing reset. If they stand in lava, fire, powder snow, or a wall, the plugin moves them to a safe spot nearby.
With limits.enabled on, a player AFK for limits.seconds (20 minutes) gets kicked. Before that, the action bar counts down at the seconds in limits.warning.seconds. Coming back stops the clock.
AFK changes nothing the game saves. A player who quits, dies, or changes worlds while AFK leaves AFK quietly and comes back with nothing left over. Only their total AFK time, the number of times they went AFK, and the language they chose stay in their player data.
Vanish plugins like SuperVanish, PremiumVanish, and Essentials mark hidden players, and Mo’Afks reads that mark. Others hear nothing when a vanished player goes AFK or comes back, see no [AFK] mark, and find them in no placeholder and no Plan list. Only the player sees their particle ring. They keep the protection and their own messages, and the console still logs them.
Next: Commands and permissions
Players and server owners
- Installation
- First steps
- How AFK works
- Commands and permissions
- Configuration
- Languages
- Integrations
- FAQ
Developers