SAFK
SAFK is a lightweight AFK management mod for Minecraft Fabric servers.
It provides a simple and reliable AFK system with automatic player detection, visible AFK indicators, administrative controls, automatic language support, and protection against abandoned indicators after disconnects, restarts, or unexpected server crashes.
The mod is designed to remain lightweight and require minimal configuration.
Main Features
Automatic AFK Detection
SAFK automatically detects when a player has been inactive for the configured amount of time.
When the player becomes AFK:
- Their AFK state is registered by the server
- A visible AFK indicator appears above the player
- Other players can easily identify that they are currently away
When activity is detected again, the AFK state is automatically removed.
Players can also manually change their AFK status using:
/afk
AFK Indicators
AFK players receive a visible indicator above their character.
Each indicator is internally linked to the player's UUID instead of depending only on the player's name.
This allows SAFK to reliably determine who owns each active indicator and prevents unrelated or duplicated indicators from remaining in the world.
Automatic Orphan Cleanup
SAFK includes an automatic cleanup system designed to prevent floating AFK indicators from becoming permanently stuck in the world.
The server continuously validates existing SAFK indicators.
An indicator is automatically removed when:
- Its player is no longer online
- Its owner is no longer AFK
- The linked player UUID is invalid
- The player disconnects
- The player respawns
- The indicator becomes detached from its owner
- An old indicator remains after a server restart
- An old indicator is encountered after an unexpected server crash
This also applies to previously saved indicators inside unloaded chunks.
When those chunks are loaded again, SAFK validates the indicator and removes it if there is no longer a valid AFK player associated with it.
Server Restart and Crash Recovery
SAFK does not rely exclusively on normal disconnect events.
This is important because unexpected situations such as:
- Server crashes
- Forced process termination
- Machine shutdowns
- Unexpected hosting restarts
may prevent normal cleanup events from running.
SAFK performs additional validation when the server starts and while the server is running.
Old AFK indicators that no longer belong to a valid AFK player are automatically discarded.
Administrative Controls
Server administrators can manage SAFK using:
/adminafk
A manual cleanup command is also available:
/adminafk cleanup
Portuguese alias:
/adminafk limpar
The cleanup process removes loaded SAFK indicators and restores only the indicators that should currently exist for valid AFK players.
This provides administrators with an additional recovery option without requiring a server restart.
Commands
| Command | Permission | Function |
|---|---|---|
/afk |
Player | Changes the player's AFK state |
/adminafk |
Administrator | Opens SAFK administrative controls |
/adminafk cleanup |
Administrator | Cleans and validates AFK indicators |
/adminafk limpar |
Administrator | Alias for the cleanup command |
Automatic Language Detection
SAFK automatically uses the language selected by each player in Minecraft.
There is no separate language setting inside the mod.
Currently included languages:
| Language | Minecraft Code |
|---|---|
| English | en_us |
| Portuguese, Brazil | pt_br |
| Spanish | es_es |
| Japanese | ja_jp |
| Simplified Chinese | zh_cn |
| Hindi | hi_in |
| Arabic | ar_sa |
Different players connected to the same server can receive SAFK messages in different languages at the same time.
If the player's selected language is not supported, SAFK automatically falls back to en_us.
Lightweight Design
SAFK is designed for long-running Minecraft servers.
The AFK system avoids unnecessary complexity while still maintaining continuous validation of player states and AFK indicators.
The cleanup system operates automatically and does not require administrators to constantly manage leftover entities.
Data Reliability
AFK indicators are associated with player UUIDs and validated by the server.
SAFK verifies that an indicator still has a valid owner before allowing it to remain active.
This helps prevent:
- Duplicate indicators
- Indicators without players
- Old indicators after crashes
- Indicators remaining after disconnects
- Incorrect AFK states after respawns
- Persistent floating text without a valid owner
Compatibility
SAFK is available for:
Minecraft 1.20.1
Minecraft 1.21.1
Loader:
Fabric
The project maintains separate version-specific builds while keeping the same SAFK behavior and configuration across supported Minecraft versions.
Project Information
Mod: SAFK
Author: Silas T.
Minecraft: 1.20.1 / 1.21.1
Loader: Fabric
License: All Rights Reserved