A data pack for 1.16x-1.18x
Any player can switch to 'AFK Mode' with the command /trigger afk.
Players in the AFK mode receive a grey AFK tag so that other players on a server can see that this player is currently AFK.
(Note: This data pack does not make you invincible against mobs!)
Download the latest release from here and put the datapack zip file into the datapacks
folder of your Minecraft world.
To change the settings use /trigger menu
and click on the Settings button or use /trigger afk_settings_ui
to open the settings UI.
To check for updates use /trigger menu
and hit the Check for Updates button. There is also a Reset and an Uninstall button.