How to make an AFK detector in Minecraft(BEDROCK) Remade
Today I will show you how to make a AFK detector in Minecraft. This can be used to find if a player is AFK and apply another command because of that.
COMMANDS:
/scoreboard objectives add AFK dummy ""
/execute at @a run fill ~2 319 ~2 ~-2 319 ~1 air [] replace structure_void
/execute at @a run fill ~-2 319 ~-2 ~2 319 ~-1 air [] replace structure_void
/execute at @a run fill ~2 319 ~2 ~1 319 ~-2 air [] replace structure_void
/execute at @a run fill ~-2 319 ~-2 ~-1 319 ~2 air [] replace structure_void
/execute as @a at @s if block ~ 319 ~ air [] run scoreboard players set @s AFK 0
/execute as @a at @s if block ~ 319 ~ air [] run setblock ~ 319 ~ structure_void
/execute as @a at @s if block ~ 319 ~ structure_void [] run scoreboard players add @s AFK 1
/execute as @a[scores={AFK=400..}] run title @a title YOU ARE NOW AFK