Compatibility
Minecraft: Java Edition
1.21.5
Platforms
Tags
Creators
Details
Licensed MIT
Published last year
This datapack adds a simple afk mechanic, useful for surival servers or other situations where you might want to know who is or isn't around.
Usage
all players have access to the /trigger afk command which will set their status to afk.
Server operators can also change the amount of time until a player is automatically set as afk using /scoreboard players set $time simple_afk.time_until_afk <time in ticks> (defaults to 6000 ticks, which is 5 minutes. There are 20 seconds in a tick)
Developing
If you'd like to use a player's AFK status in another datapack, simply check for one of the following:
- Players on the
simple_afk.afk_playersteam - Players with the
simple_afk.afktag
Custom Commands
if you are using the mod Melius Commands, here is a config file to create a /afk command
{
"id": "afk",
"executes": [
{
"command": "function simple_afk:messages/go_afk",
"as_console": false,
"op_level": 4
}
]
}


