JustAFK
JustAFK 是一款轻量级的服务端 AFK(挂机)插件,适用于兼容 Bukkit 的 Minecraft 服务器。
在可配置的时间内未检测到已识别的活动后,它会将玩家标记为 AFK;提供手动和管理员控制的 AFK 状态管理;广播 AFK 状态变更;并可在 TAB 玩家列表中直接显示当前的 AFK 时长。
JustAFK 专注于简洁、可配置且易于运行。它不使用 NMS、数据库、客户端模组或外部运行时库。
JustAFK 完全位于服务端。玩家无需在客户端安装任何内容。
兼容性说明: JustAFK 1.3.0 针对 Minecraft 1.21.3–26.3 使用同一个 JAR 文件,并要求 Java 21 或更高版本来运行该插件。服务器可能需要更新版本的 Java 运行时;Paper 26.1 及更高版本需要 Java 25。
低于 Minecraft 1.21.3 的服务器可以继续使用该版本列出的兼容范围内的 JustAFK 1.0.1。它使用基于位置的旧版 AFK 检测机制。
文档: 有关安装、配置、命令、权限、AFK 行为、API 用法和故障排除的信息,请访问 JustAFK 文档。
为什么要使用 JustAFK?
- 轻量级、感知活动的 AFK 检测
- 基于移动输入的检测,而非基于位置
- 将聊天消息识别为玩家活动
- 将方块破坏和放置识别为活动
- 将玩家钓鱼行为识别为活动
- 将方块、物品和实体交互识别为活动
- 当其他插件取消事件时,已识别的活动仍会计入
- 全局启用/禁用插件控制
- 独立配置自动 AFK 检测
- 每位玩家均可使用的 AFK 手动命令
- 管理员可控制其他在线玩家的 AFK 状态
- 可配置的不活跃超时时间
- 可配置的 AFK 公告
- 可选的 TAB 玩家列表前缀
- AFK 时长以分钟或小时显示
- 击退和外部移动期间保持 AFK 状态
- 死亡和重生过程中保持 AFK 状态及时长
- 保留玩家列表名称,以兼容格式化插件
- 通过 Bukkit 的
ServicesManager 公开 AFK API
- 公开 Bukkit 事件用于监听 AFK 状态变更
- 通过命令立即保存配置
- 命令自动补全支持
- 支持 Folia 调度器
- 无 NMS、数据库或外部运行时依赖
- 兼容 LuckPerms 等权限管理器
- 完全位于服务端
JustAFK 仅将玩家标记为 AFK。它不会踢出、冻结、传送、惩罚或限制玩家。
预览
| 玩家列表 |
聊天公告 |
 |
 |
兼容性
JustAFK 1.3.0
JustAFK 1.3.0 使用现代 Minecraft 服务器版本中引入的玩家输入 API,以及标准的 Bukkit 活动事件。
| 平台 |
API 兼容范围 |
状态 |
| Paper |
1.21.3–26.3 |
API 兼容;Paper 26.3 为主要构建目标 |
| Purpur |
1.21.3–26.3 |
作为 Paper 分支预期兼容,前提是存在兼容的构建版本 |
| Folia |
1.21.3–26.3 |
在服务端构建保留了所需 API 和调度器契约的情况下,使用原生 Folia 调度器 |
| Spigot |
1.21.3–26.3 |
基于 Spigot 1.21.3 进行兼容性编译 |
| CraftBukkit |
1.21.3–26.3 |
基于共享的 Bukkit API 实现兼容 |
| Sponge |
不支持 |
使用不同的插件 API 和生命周期 |
| BungeeCord, Velocity, Waterfall |
不支持 |
代理平台;请将 JustAFK 安装在后端服务器上 |
1.3.0 版本基于固定的稳定 Paper API 26.3.build.230-stable 构建,并与 Spigot 1.21.3 进行了兼容性编译。
两种编译必须在项目构建通过之前生成相同的类文件。
JAR 文件使用 Java 21 字节码。根据服务器的 Minecraft 版本,服务器可能需要更高版本的 Java。Paper 26.1 及更高版本需要 Java 25,包括 Paper 26.3。从源码构建 JustAFK 需要 JDK 25,并生成 Java 21 字节码。
api-version 设置为 1.21.3,这会导致不受支持的旧服务器拒绝加载插件,而不是在使用移动输入 API 时稍后失败。
这些检查确立了 API 端点的编译和字节码兼容性。本次更新未执行真实服务器运行时测试。 该范围并不意味着每个平台都发布了其中的每个 Minecraft 版本,也不意味着对每个中间版本和分支都进行了单独测试。Purpur 和 Folia 的兼容性取决于可用构建是否保留了所需的 API 和调度器契约。
较旧的 Minecraft 版本
低于 Minecraft 1.21.3 的服务器应继续使用该版本声明的兼容范围内的 JustAFK 1.0.1。
以下是 JustAFK 1.0.1 列出的遗留兼容范围;本次更新并未扩展或重新验证它们:
| 平台 |
JustAFK 1.0.1 声明的兼容性 |
| Paper |
1.8.8–26.2 |
| Purpur |
1.14.1–26.2 |
| Folia |
1.19.4–26.2 |
| Spigot / CraftBukkit |
1.8.8–26.2,尽力支持 |
发布的 1.0.1 更新日志记录了在 Paper 1.8.8 和 26.2、Purpur 26.2 以及 Folia 26.1.2 上进行的冒烟测试。这些结果并不能证明在声明的范围内的每个版本都进行了运行时测试。
JustAFK 1.0.1 使用 Java 8 兼容的字节码,并且对于无法升级到 Minecraft 1.21.3 的服务器仍然可用。
然而,1.0.1 版本不包含:
- 基于输入的活动检测
- 防止因击退或外部移动导致的 AFK 移除
- 识别聊天、钓鱼、方块、物品和实体的活动
- 公开的 AFK API
- 公开的 AFK 状态变更事件
- 全局
enabled 选项
- 独立的
automatic-afk-enabled 选项
1.0.1 版本通过位置变化来检测活动。因此,史莱姆、生物、箭矢、爆炸、水流或其他外力可能会重置非活动时间计时器或移除 AFK 状态。
支持的范围版本并不意味着每个中间服务器版本都经过了单独的运行时测试。
AFK 检测的工作原理
默认情况下,如果在 300 秒(即五分钟)内未检测到已识别的活动,玩家将被标记为 AFK。
移动输入
JustAFK 识别以下移动输入:
JustAFK 结合两种移动输入检测方法:
PlayerInputEvent 检测即时输入变化和短按键
Player#getCurrentInput() 轮询在保持移动输入时使玩家保持活跃状态
超时检查和保持输入轮询每秒运行一次。其他已识别的活动在其对应的 Bukkit 事件发生时进行处理。
只要服务器报告输入处于激活状态,按住按键或客户端侧的移动切换仍被视为活动。
其他已识别的活动
JustAFK 1.3.0 还识别以下活动:
- 发送聊天消息
- 破坏方块
- 放置方块
- 玩家驱动的钓鱼动作
- 与方块交互
- 使用或交互物品
- 与实体交互
- 与实体上的特定点交互
当检测到已识别的活动时:
- 非活动时间计时器重新启动
- AFK 玩家立即变为活跃状态
- 移除 AFK TAB 前缀
- 发送配置好的活跃状态公告
- 当状态实际发生变化时,发布公开的 AFK 状态变更事件
被取消的动作
即使另一个插件取消了相应的事件,已识别的活动仍然计入。
例如:
- 尝试在受保护区域破坏或放置方块
- 与受保护的方块或实体交互
- 尝试使用物品,但其他插件阻止了其使用
- 提交聊天消息,但随后被管理插件取消
动作的结果可能被阻止,但该动作仍能证明玩家在场且处于活跃状态。
钓鱼行为
玩家驱动的钓鱼动作被视为活动。抛竿、收线以及由玩家发起的其他动作会重启非活动时间计时器。
仅由服务器生成的鱼咬钩不算作活动,因为它可以在没有玩家新输入的情况下发生。
这防止了在进行钓鱼活动时保持静止的玩家被错误地标记为 AFK。
聊天行为
发送聊天消息会移除 AFK 状态并重启非活动时间计时器。
即使其他插件随后取消了聊天事件,这也适用。聊天活动从异步聊天事件安全地转移到相应的 Bukkit 或 Folia 玩家调度程序中。
物理交互
压力板激活等物理方块交互不计入独立的活动。
这些交互可能由击退、实体推动、水流或其他外部源引起,并不总是代表玩家的有意操作。
外部移动
除非玩家同时发送移动输入,否则位置变化不计入活动。
因此,当受到以下因素影响时,AFK 玩家将保持 AFK 状态:
- 实体碰撞
- 宠物或生物推动玩家
- 史莱姆
- 僵尸攻击
- 骷髅箭矢
- 击退
- 爆炸
- 流动的水
- 气泡柱
- 活塞
- 末影箱
- 重力或坠落
- 被动载具移动
- 服务器或插件传送
- 死亡
- 重生
这些事件不会重启非活动时间计时器或重置显示的 AFK 持续时间。
如果玩家在受到击退或其他外力影响的同时发送移动输入,由于客户端正在接收移动输入,该玩家被视为活跃状态。
使用鼠标环顾四周不会重置计时器。
AFK 会话
AFK 状态基于会话:
- 死亡不会重置 AFK 状态
- 重生不会重置 AFK 状态
- 外部移动不会重置 AFK 状态
- 已识别的玩家活动会移除 AFK 状态
- 手动关闭 AFK 会开始新的非活跃期
- 断开连接会移除跟踪的会话
- 重新连接会开始新会话并重置 AFK 状态
插件运行模式
插件启用
默认全局状态为:
enabled: true
启用后,JustAFK 根据其余配置正常运行。
设置可以在运行时更改:
/justafk set enabled on
/justafk set enabled off
插件禁用
当 enabled 设置为 false 时:
- 不再跟踪玩家活动
- 自动 AFK 检测停止
/afk 不再改变 AFK 状态
- 管理员 AFK 更改被禁用
- 清除现有的插件管理的 AFK 状态
- 恢复由 JustAFK 管理的项目列表前缀
- AFK 公告停止
- AFK 持续时间更新停止
配置命令仍然可用:
/justafk
/justafk help
/justafk status
/justafk reload
/justafk set ...
这允许管理员在不重启服务器的情况下检查、配置、重新加载并再次启用插件。
重新启用 JustAFK 会为在线玩家启动一个新的活动跟踪会话。
自动 AFK 启用
默认启用自动 AFK 检测:
automatic-afk-enabled: true
玩家在达到配置的非活动超时时间后会自动被标记为 AFK。
自动 AFK 禁用
可以独立禁用自动 AFK 检测:
automatic-afk-enabled: false
也可以在运行时更改:
/justafk set automatic-afk off
当禁用自动 AFK 检测时:
- 闲置不会自动将玩家标记为 AFK
- 玩家仍可使用
/afk
- 管理员仍可控制其他玩家的 AFK 状态
- 识别到的活动仍会移除手动应用的 AFK 状态
- 公告继续对手动 AFK 更改生效
- 玩家列表前缀继续对手动 AFK 状态生效
这使得 JustAFK 仅作为手动 AFK 插件运行。
AFK 时长
可选的 TAB 前缀显示玩家被标记为 AFK 的时间长度。
示例:
- 刚进入 AFK 的玩家显示
0m
- 五分钟显示
5m
- 五十九分钟显示
59m
- 一小时显示
1h
- 两小时显示
2h
不足 60 分钟时以分钟为单位显示。从 60 分钟开始,时长以整小时为单位显示。
默认格式为:
&7[AFK {duration}]&r
这会在玩家现有的玩家列表名称之前添加一个灰色前缀。
JustAFK 保留现有的玩家列表名称,而不是将其替换为账户名称。
如果其他插件在玩家处于 AFK 状态时更新 TAB 名称,JustAFK 会将新值作为其基础。同时,它在移除 AFK 前缀时避免覆盖其他格式化插件所做的较新更改。
公共 API
JustAFK 1.3.0 提供了供其他插件使用的官方只读 API:
pt.captainratax.justafk.api.JustAfkApi
当 JustAFK 启用时,该提供者通过 Bukkit 的 ServicesManager 注册。
示例:
import org.bukkit.Bukkit;
import pt.captainratax.justafk.api.JustAfkApi;
JustAfkApi api = Bukkit.getServicesManager().load(JustAfkApi.class);
boolean playerIsAfk = api != null && api.isAfk(player);
可用方法:
boolean isAfk(Player player);
boolean isAfk(UUID playerId);
两种方法均读取 JustAFK 内部维护的同一 AFK 状态。
未追踪或当前不在线的未知 UUID 返回 false。查询它不会创建新的追踪会话。
当插件本身被禁用或由服务器卸载时,服务将被注销。消费插件应始终处理提供者不可用的情况。
集成说明
API 创建了官方的集成接口,但其他插件不会自动发现它。
希望识别 JustAFK 玩家的插件必须显式获取并使用 JustAfkApi。JustAFK 不包含与 Sleeper、Essentials 或其他第三方 AFK 消费者的直接集成。
AFK 状态变更事件
其他插件可以监听:
pt.captainratax.justafk.api.event.PlayerAfkStateChangeEvent
该事件提供:
Player getPlayer();
boolean isAfk();
boolean isAutomatic();
该事件是已完成状态变更的通知,且不可取消。
仅在 AFK 状态实际发生变化时发布:
重复的命令、活动调用或使玩家保持在相同状态的内部检查不会发布重复事件。
仅当闲置超时将玩家移入 AFK 时,isAutomatic() 才为 true。
以下情况为 false:
- 手动 AFK 更改
- 手动返回活跃
- 由活动驱动的返回活跃
- 通过运行时配置禁用插件时产生的活跃转换
通过 enabled 配置禁用 JustAFK 会清除已追踪的 AFK 状态并发布相应的活跃事件。
玩家断开连接和插件关闭会移除追踪,而不会发布人为的活跃玩家转换。
命令
| 命令 |
默认权限 |
权限节点 |
描述 |
/afk |
所有玩家 |
justafk.use |
切换自己的 AFK 状态。 |
/afk <player> |
操作员 |
justafk.use 和 justafk.others |
切换在线玩家的 AFK 状态。 |
/afk <player> on |
操作员 |
justafk.use 和 justafk.others |
将在线玩家标记为 AFK。 |
/afk <player> off |
操作员 |
justafk.use 和 justafk.others |
移除在线玩家的 AFK 状态。 |
/afk <player> toggle |
操作员 |
justafk.use 和 justafk.others |
显式切换在线玩家的 AFK 状态。 |
/justafk |
操作员 |
justafk.config |
显示命令帮助。 |
/justafk help |
操作员 |
justafk.config |
显示命令帮助。 |
/justafk status |
操作员 |
justafk.config |
显示当前配置。 |
/justafk reload |
操作员 |
justafk.config |
重新加载 config.yml。 |
/justafk set enabled <on|off> |
操作员 |
justafk.config |
全局启用或禁用 JustAFK。 |
/justafk set automatic-afk <on|off> |
操作员 |
justafk.config |
启用或禁用自动 AFK 检测。 |
/justafk set timeout <seconds> |
操作员 |
justafk.config |
更改自动 AFK 超时时间。 |
/justafk set announcements <all|ops|none> |
操作员 |
justafk.config |
更改公告受众。 |
/justafk set playerlist <on|off> |
操作员 |
justafk.config |
启用或禁用 TAB 前缀。 |
可以使用 /jafk 别名代替 /justafk。
在不指定 on、off 或 toggle 的情况下运行 /afk <player> 默认为 toggle。
目标玩家必须在线。玩家名称完全匹配,不区分大小写。
当其他人更改玩家的 AFK 状态时,目标玩家会收到一条私有通知,指明是谁进行了更改。
/afk 和 /justafk 均包含标签补全功能。
当 JustAFK 全局禁用时,仅帮助、状态、重新加载和配置命令保持可用。
权限
| 权限节点 |
默认值 |
描述 |
justafk.use |
所有人 |
允许玩家对自己使用 /afk。 |
justafk.others |
操作员 |
允许更改其他在线玩家的 AFK 状态。 |
justafk.config |
操作员 |
允许访问所有 /justafk 管理命令。 |
justafk.admin |
操作员 |
授予所有 JustAFK 权限。 |
justafk.admin 包括:
justafk.use
justafk.others
justafk.config
由于根命令 /afk 需要 justafk.use 权限,因此负责管理其他玩家的管理员(moderator)必须同时拥有 justafk.use 和 justafk.others 权限。
LuckPerms 示例
LuckPerms 为可选项。JustAFK 使用标准的 Bukkit 权限系统,可与管理 Bukkit 权限的权限插件配合使用。
允许默认组切换自身的 AFK 状态:
/lp group default permission set justafk.use true
允许管理员组管理其他玩家:
/lp group moderator permission set justafk.use true
/lp group moderator permission set justafk.others true
授予管理员组所有 JustAFK 权限:
/lp group admin permission set justafk.admin true
允许员工组管理配置,而不授予所有权限:
/lp group staff permission set justafk.config true
从默认组中移除自助式 AFK 访问权限:
/lp group default permission set justafk.use false
请将 default、moderator、admin 或 staff 替换为你服务器实际使用的组名。
ops 公告受众指的是真正的 Minecraft 服务器操作员(operators)。仅通过 LuckPerms 拥有 justafk.admin 权限的玩家不属于此列。
配置
默认的 config.yml 如下:
# 启用或禁用整个 JustAFK 插件。
# 当禁用时,仅帮助、状态、重载和配置命令可用。
enabled: true
# 在配置的超时时间后自动将不活跃玩家标记为 AFK。
# 即使禁用此项,手动 AFK 命令仍然可用。
automatic-afk-enabled: true
# 在未检测到玩家活动前等待的时间,之后玩家将被标记为 AFK。
# 活动包括移动输入、聊天消息、破坏或放置方块、
# 玩家驱动的钓鱼行为、方块/物品/实体交互以及物品使用。
# 默认值为 300 秒(5 分钟)。
inactivity-timeout-seconds: 300
announcements:
# 可选值:all, ops, none
audience: all
player-list:
# 在玩家现有的标签列表名称前添加灰色的 AFK 持续时间。
enabled: true
format: "&7[AFK {duration}]&r "
messages:
# 支持使用 '&' 的传统颜色代码。
command-prefix: "&8[&7JustAFK&8]&r "
became-afk: "&8[&7JustAFK&8]&r &7{player} is now AFK."
became-active: "&8[&7JustAFK&8]&r &7{player} is no longer AFK."
配置选项
| 选项 |
默认值 |
接受的值 |
描述 |
enabled |
true |
true 或 false |
全局启用或禁用 JustAFK。 |
automatic-afk-enabled |
true |
true 或 false |
独立启用或禁用自动 AFK 检测。 |
inactivity-timeout-seconds |
300 |
至少为 1 的整数 |
自动进入 AFK 前的无活动时间长度。 |
announcements.audience |
all |
all, ops, none |
控制谁接收 AFK 进入和退出的公告。 |
player-list.enabled |
true |
true 或 false |
启用 TAB 标签列表前缀。 |
player-list.format |
&7[AFK {duration}]&r |
包含 {duration} 的文本 |
控制在现有标签列表名称之前显示的前缀。 |
messages.command-prefix |
JustAFK 前缀 |
任意文本 |
用于命令响应的前缀。 |
messages.became-afk |
默认 AFK 消息 |
任意文本 |
玩家进入 AFK 时发送的消息。 |
messages.became-active |
默认活跃消息 |
任意文本 |
玩家离开 AFK 时发送的消息。 |
由早期版本的 JustAFK 创建的配置保持兼容。
JustAFK 1.3.0 未添加、删除或重命名任何配置键。
1.1.0 中引入的 enabled 和 automatic-afk-enabled 选项在旧配置中缺失时仍默认为 true。无需删除或重新生成现有配置文件。
公告受众
all — 向所有在线玩家发送公告
ops — 仅向在线服务器操作员发送公告
none — 禁用 AFK 公告
进入和离开 AFK 时使用相同的受众设置。
占位符
{duration} 是 player-list.format 中必需的
{player} 可在 AFK 进入和退出消息中使用
支持使用 & 的传统颜色代码。
配置命令会验证更改并立即将其保存到 config.yml。
在支持 YAML 注释解析的服务器 API 上,当配置命令保存文件时会保留注释。
手动编辑 config.yml 后,请运行:
/justafk reload
要求
JustAFK 1.3.0
- Minecraft 1.21.3–26.3
- 在上述兼容性限制内的受支持的 Bukkit 兼容 Java Edition 服务器
- Java 21 或更高版本
- 无需客户端模组
- 无运行时依赖项
根据服务器的 Minecraft 版本,可能需要更新 Java 版本。Paper 26.1 及更高版本(包括 Paper 26.3)需要 Java 25。
JustAFK 1.0.1
对于低于 Minecraft 1.21.3 的受支持服务器,请使用 1.0.1 版本。
- 兼容 Java 8 的插件字节码
- 基于位置的 activity 检测
- 无感知输入的 AFK 保护
- 无扩展的 activity 事件
- 无公开的 AFK API 或状态变更事件
- 无全局开关或自动 AFK 开关
通过标准 Bukkit 权限支持 LuckPerms,但非必需。
安装
Minecraft 1.21.3–26.3
- 下载
JustAFK-1.3.0.jar。
- 停止服务器。更新时,请备份当前配置并移除之前的 JustAFK JAR 文件。
- 将 JAR 文件放入服务器的
plugins 目录中,确保只保留一个 JustAFK JAR 文件。
- 启动服务器并检查 JustAFK 的启用消息。
- 打开
plugins/JustAFK/config.yml 以查看配置。
- 进行手动配置更改后,运行
/justafk reload。
- 如需,使用 LuckPerms 配置额外权限。
Minecraft 版本低于 1.21.3
- 下载 JustAFK 1.0.1。
- 将
JustAFK-1.0.1.jar 放入服务器的 plugins 目录。
- 启动或重启服务器。
- 正常配置该插件。
不要在低于 Minecraft 1.21.3 的服务器上安装 JustAFK 1.3.0。
当使用 BungeeCord、Velocity 或 Waterfall 时,请在每个需要 AFK 检测的后端 Bukkit 兼容服务器上安装 JustAFK。不要将其放置在代理服务器的插件目录中。
验证
JustAFK 1.3.0 已通过以下验证:
- 43 项自动化测试
- 针对所有七种移动输入标志的单独测试
- 短输入点击测试
- 持续输入轮询测试
- 方块破坏与放置活动测试
- 玩家驱动的钓鱼活动测试
- 服务器生成的钓鱼咬钩排除测试
- 方块、物品和实体交互测试
- 异步聊天活动测试
- 已取消的聊天和交互事件测试
- AFK 到活跃状态转换测试
Player 和 UUID 查询的公共 API 测试
- 验证未知 UUID 查询不会创建跟踪状态
- 自动和手动 AFK 事件元数据测试
- 重复 AFK 状态更改事件防止测试
- 不活跃超时测试
- 外部移动回归测试
- 全局插件禁用测试
- 自动 AFK 禁用测试
- Paper 26.3 build 230 稳定版主编译
- Spigot 1.21.3 兼容性编译
- Paper 和 Spigot 字节码一致性验证
- Java 21 字节码验证
- 运行时依赖验证
- 插件版本、API 基线和 JAR 清单元数据检查
./gradlew clean build 在 JDK 25.0.5 下通过。所有 43 项自动化测试均通过,零失败、零错误或零跳过测试。
支持版本范围并不意味着每一个中间版本的 Minecraft 或服务器平台发布都经过单独的运行时测试。本次更新未进行真实服务器运行时测试。在部署之前,请在你打算使用的服务器构建上验证活动检测、自动和手动 AFK 转换、命令、权限、公告、Tab 列表集成、配置重载以及关闭过程。在 Folia 上,还需验证跨区域变更和玩家断开连接时的调度情况。
常见问题
JustAFK 会踢出不活跃的玩家吗?
不会。JustAFK 仅将玩家标记为 AFK,广播状态更改,并可选择显示 TAB 前缀。
玩家需要安装任何东西吗?
不需要。JustAFK 完全位于服务器端。
钓鱼算作活动吗?
是的。玩家驱动的钓鱼动作会重置计时器并立即移除 AFK 状态。
仅由服务器生成的钓鱼咬钩不算,因为它不是新的玩家输入。
在聊天中输入会移除 AFK 吗?
是的。提交聊天消息会移除 AFK 并重置不活跃计时器。
即使其他插件随后取消了该消息,此规则仍然适用。
被取消的交互算作活动吗?
是的。只要来自玩家的动作为系统所识别,即使其结果被其他插件取消,也算作活动。
环顾四周会重置计时器吗?
不会。摄像机移动、偏航角(yaw)和俯仰角(pitch)不计入移动输入。
击退会移除 AFK 吗?
不会。JustAFK 1.1.0 及更高版本使用移动输入而非位置变化来检测活动。
击退、实体推动、箭矢、爆炸、水流以及其他外部位置变化不会移除 AFK,除非玩家同时发送移动输入。
JustAFK 1.0.1 使用基于位置的 activity 检测,因此在该版本中,外部移动可能会移除 AFK。
死亡会重置 AFK 吗?
不会。死亡和重生保留 AFK 状态及其显示的持续时间。
断开连接和重新连接会开始新会话并重置 AFK 状态。
按住移动键算作活动吗?
是的。JustAFK 会定期检查当前输入,因此保持按住的输入会继续算作活动。
可以禁用自动 AFK 检测吗?
可以。设置:
automatic-afk-enabled: false
或者运行:
/justafk set automatic-afk off
当自动检测被禁用时,玩家仍可使用手动 AFK。已识别的活动仍会移除手动应用的 AFK 状态。
可以在不移除 JAR 的情况下禁用 JustAFK 吗?
可以。设置:
enabled: false
或者运行:
/justafk set enabled off
帮助、状态、重载和配置命令仍然可用。
可以禁用公告吗?
可以。将 announcements.audience 设置为 none 或者运行:
/justafk set announcements none
可以禁用 TAB 前缀吗?
可以。运行:
/justafk set playerlist off
可以自定义消息和颜色吗?
可以。编辑 config.yml 中的消息和玩家列表设置。支持传统的 & 颜色代码。
其他插件可以检查玩家是否处于 AFK 状态吗?
可以。JustAFK 1.3.0 通过 Bukkit 的 ServicesManager 提供 JustAfkApi,并发布 PlayerAfkStateChangeEvent。
其他插件必须显式支持并消费此 API。仅安装 JustAFK 并不会自动为非相关的 AFK 消费者添加兼容性。
我应该使用哪个版本?
在 Minecraft 1.21.3–26.3 范围内,并在上述平台兼容性限制内,请使用 JustAFK 1.3.0。
在支持的低于 1.21.3 的 Minecraft 版本上,请使用 JustAFK 1.0.1。
我需要哪个 Java 版本?
JustAFK 1.3.0 需要 Java 21 或更高版本。
你的 Minecraft 服务器可能需要更新的版本。Paper 26.1 及更高版本(包括 Paper 26.3)需要 Java 25。
JustAFK 1.0.1 使用与 Java 8 兼容的字节码,以兼容较旧的服务器。
每个支持的 Minecraft 版本都经过单独测试了吗?
没有。
JustAFK 1.3.0 是基于 Paper 26.3 构建的,并与 Spigot 1.21.3 进行了兼容性编译。
与中间版本的兼容性基于共享的 Bukkit API 和构建时兼容性验证。本次更新未进行真实服务器运行时测试,Purpur/Folia 的兼容性取决于可用构建是否保留了所需的 API 和调度契约。
JustAFK 是否需要 ProtocolLib、Vault、PlaceholderAPI 或其他插件?
不需要。JustAFK 没有外部运行时依赖项。
JustAFK 能否在代理服务器上运行?
不能。BungeeCord、Velocity 和 Waterfall 均为代理平台。
请将 JustAFK 安装到后端的 Paper、Purpur、Spigot、CraftBukkit 或 Folia 服务器中。
源码与支持
JustAFK 是开源软件,采用 MIT 许可证授权。
JustAFK
JustAFK is a lightweight, server-side AFK plugin for Bukkit-compatible Minecraft servers.
It marks players as AFK after a configurable period without recognized activity, provides manual and administrative AFK controls, announces AFK state changes, and can display the current AFK duration directly in the TAB player list.
JustAFK focuses on being simple, configurable, and easy to run. It does not use NMS, databases, client mods, or external runtime libraries.
JustAFK is completely server-side. Players do not need to install anything on their clients.
Compatibility notice: JustAFK 1.3.0 targets Minecraft 1.21.3–26.3 with the same JAR and requires Java 21 or newer for the plugin. The server may require a newer Java runtime; Paper 26.1 and newer require Java 25.
Servers below Minecraft 1.21.3 can continue using JustAFK 1.0.1, within the compatibility listed for that release. It uses the previous position-based AFK detection.
Documentation: For installation, configuration, commands, permissions, AFK behavior, API usage, and troubleshooting, visit the JustAFK documentation.
Why use JustAFK?
- Lightweight, activity-aware AFK detection
- Movement-input detection instead of position-based detection
- Chat messages recognized as player activity
- Block breaking and placement recognized as activity
- Player-driven fishing recognized as activity
- Block, item, and entity interactions recognized as activity
- Recognized activity still counts when another plugin cancels its event
- Global plugin enable/disable control
- Independently configurable automatic AFK detection
- Manual AFK command for every player
- Administrative control over other online players
- Configurable inactivity timeout
- Configurable AFK announcements
- Optional TAB player-list prefix
- AFK duration shown in minutes or hours
- AFK state preserved during knockback and external movement
- AFK state and duration preserved through death and respawn
- Player-list name preservation for compatibility with formatting plugins
- Public AFK API through Bukkit's
ServicesManager
- Public Bukkit event for AFK state changes
- Immediate configuration saving through commands
- Command tab completion
- Folia-aware scheduling
- No NMS, databases, or external runtime dependencies
- Compatible with permission managers such as LuckPerms
- Completely server-side
JustAFK only marks players as AFK. It does not kick, freeze, teleport, punish, or restrict them.
Preview
| Player list |
Chat announcements |
 |
 |
Compatibility
JustAFK 1.3.0
JustAFK 1.3.0 uses the player-input API introduced in modern Minecraft server versions together with standard Bukkit activity events.
| Platform |
API compatibility range |
Status |
| Paper |
1.21.3–26.3 |
API-compatible; Paper 26.3 is the primary build target |
| Purpur |
1.21.3–26.3 |
Expected compatibility as a Paper fork, where compatible builds exist |
| Folia |
1.21.3–26.3 |
Uses native Folia schedulers where server builds preserve the required APIs and scheduler contracts |
| Spigot |
1.21.3–26.3 |
Compatibility-compiled against Spigot 1.21.3 |
| CraftBukkit |
1.21.3–26.3 |
Compatibility based on the shared Bukkit API |
| Sponge |
Not supported |
Uses a different plugin API and lifecycle |
| BungeeCord, Velocity, Waterfall |
Not supported |
Proxy platforms; install JustAFK on the backend server instead |
Version 1.3.0 is built against the fixed stable Paper API 26.3.build.230-stable and compatibility-compiled against Spigot 1.21.3.
Both compilations must produce identical class files before the project build passes.
The JAR uses Java 21 bytecode. The server may require a newer Java version depending on its Minecraft version. Paper 26.1 and newer require Java 25, including Paper 26.3. Building JustAFK from source requires JDK 25 and emits Java 21 bytecode.
The api-version is set to 1.21.3, causing unsupported older servers to refuse to load the plugin instead of failing later when the movement-input API is used.
These checks establish compilation and bytecode compatibility at the API endpoints. No real-server runtime tests were performed for this update. The range does not imply that every platform publishes every Minecraft version within it, or that every intermediate version and fork was individually tested. Purpur and Folia compatibility remains conditional on available builds preserving the required APIs and scheduler contracts.
Older Minecraft versions
Servers below Minecraft 1.21.3 should continue using JustAFK 1.0.1, within the compatibility declared for that release.
The following are the legacy compatibility ranges listed for JustAFK 1.0.1; this update does not extend or revalidate them:
| Platform |
JustAFK 1.0.1 declared compatibility |
| Paper |
1.8.8–26.2 |
| Purpur |
1.14.1–26.2 |
| Folia |
1.19.4–26.2 |
| Spigot / CraftBukkit |
1.8.8–26.2, best-effort |
The published 1.0.1 changelog records smoke tests on Paper 1.8.8 and 26.2, Purpur 26.2, and Folia 26.1.2. These results do not establish runtime testing for every version in the declared ranges.
JustAFK 1.0.1 uses Java 8-compatible bytecode and remains available for servers that cannot upgrade to Minecraft 1.21.3.
However, version 1.0.1 does not include:
- Input-aware activity detection
- Protection against AFK removal caused by knockback or external movement
- Recognition of chat, fishing, block, item, and entity activity
- The public AFK API
- The public AFK state-change event
- The global
enabled option
- The independent
automatic-afk-enabled option
Version 1.0.1 detects activity through position changes. A slime, mob, arrow, explosion, water current, or another external force may therefore reset the inactivity timer or remove AFK.
The supported version ranges do not mean that every intermediate server release has been individually runtime-tested.
How AFK detection works
By default, a player is marked as AFK after 300 seconds, or five minutes, without recognized activity.
Movement input
JustAFK recognizes the following movement inputs:
- Forward
- Backward
- Left
- Right
- Jump
- Sneak
- Sprint
JustAFK combines two movement-input detection methods:
PlayerInputEvent detects immediate input changes and short key presses
Player#getCurrentInput() polling keeps the player active while a movement input remains held
Timeout checks and held-input polling run once per second. Other recognized activities are processed when their corresponding Bukkit event occurs.
A held key or client-side movement toggle continues to count as activity while the server reports that input as active.
Other recognized activity
JustAFK 1.3.0 also recognizes:
- Submitting a chat message
- Breaking a block
- Placing a block
- Player-driven fishing actions
- Interacting with blocks
- Interacting with or using items
- Interacting with entities
- Interacting with a precise point on an entity
When recognized activity is detected:
- The inactivity timer is restarted
- An AFK player immediately becomes active
- The AFK TAB prefix is removed
- The configured active announcement is sent
- A public AFK state-change event is published when the state actually changes
Cancelled actions
Recognized activity still counts when another plugin cancels the corresponding event.
For example:
- Attempting to break or place a block in a protected area
- Interacting with a protected block or entity
- Attempting to use an item when another plugin blocks its use
- Submitting a chat message that is later cancelled by a moderation plugin
The result of the action may be prevented, but the action still demonstrates that the player is present and active.
Fishing behavior
Player-driven fishing actions count as activity. Casting, reeling, and other actions initiated by the player restart the inactivity timer.
A server-generated fishing bite alone does not count because it can occur without new input from the player.
This prevents players who remain stationary while actively fishing from being incorrectly marked as AFK.
Chat behavior
Submitting a chat message removes AFK and restarts the inactivity timer.
This also applies when another plugin later cancels the chat event. Chat activity is transferred safely from the asynchronous chat event to the appropriate Bukkit or Folia player scheduler.
Physical interactions
Physical block interactions such as pressure-plate activation are not independently counted as activity.
These interactions can happen because of knockback, entity pushes, water, or another external source and do not always represent a deliberate player action.
External movement
Position changes do not count as activity unless the player is also sending movement input.
An AFK player therefore remains AFK when moved by:
- Entity collisions
- Pets or mobs pushing the player
- Slimes
- Zombie attacks
- Skeleton arrows
- Knockback
- Explosions
- Flowing water
- Bubble columns
- Pistons
- Shulkers
- Gravity or falling
- Passive vehicle movement
- Server or plugin teleports
- Death
- Respawn
These events do not restart the inactivity timer or reset the displayed AFK duration.
If the player sends movement input while receiving knockback or another external force, the player is considered active because movement input is being received from the client.
Looking around with the mouse does not reset the timer.
AFK sessions
AFK states are session-based:
- Death does not reset the AFK state
- Respawn does not reset the AFK state
- External movement does not reset the AFK state
- Recognized player activity removes the AFK state
- Manually turning AFK off starts a fresh inactivity period
- Disconnecting removes the tracked session
- Reconnecting starts a new session and resets the AFK state
Plugin operating modes
Plugin enabled
The default global state is:
enabled: true
When enabled, JustAFK operates normally according to the remaining configuration.
The setting can be changed at runtime:
/justafk set enabled on
/justafk set enabled off
Plugin disabled
When enabled is set to false:
- Player activity is no longer tracked
- Automatic AFK detection stops
/afk no longer changes AFK states
- Administrative AFK changes are disabled
- Existing plugin-managed AFK states are cleared
- Player-list prefixes managed by JustAFK are restored
- AFK announcements stop
- AFK duration updates stop
The configuration commands remain available:
/justafk
/justafk help
/justafk status
/justafk reload
/justafk set ...
This allows administrators to inspect, configure, reload, and enable the plugin again without restarting the server.
Re-enabling JustAFK starts a fresh activity-tracking session for online players.
Automatic AFK enabled
Automatic AFK detection is enabled by default:
automatic-afk-enabled: true
Players are automatically marked as AFK after the configured inactivity timeout.
Automatic AFK disabled
Automatic AFK detection can be disabled independently:
automatic-afk-enabled: false
It can also be changed at runtime:
/justafk set automatic-afk off
When automatic AFK detection is disabled:
- Inactivity does not place players into AFK automatically
- Players can still use
/afk
- Administrators can still control another player's AFK state
- Recognized activity still removes a manually applied AFK state
- Announcements continue to work for manual AFK changes
- The player-list prefix continues to work for manual AFK states
This allows JustAFK to operate exclusively as a manual AFK plugin.
AFK duration
The optional TAB prefix displays how long the player has been marked as AFK.
Examples:
- A newly AFK player displays
0m
- Five minutes displays
5m
- Fifty-nine minutes displays
59m
- One hour displays
1h
- Two hours displays
2h
Minutes are shown below 60 minutes. From 60 minutes onwards, the duration is shown in whole hours.
The default format is:
&7[AFK {duration}]&r
This produces a grey prefix before the player's existing player-list name.
JustAFK preserves the existing player-list name instead of replacing it with the account name.
If another plugin updates the TAB name while the player is AFK, JustAFK adopts the new value as its base. It also avoids overwriting newer changes made by other formatting plugins when removing the AFK prefix.
Public API
JustAFK 1.3.0 provides an official read-only API for other plugins:
pt.captainratax.justafk.api.JustAfkApi
The provider is registered through Bukkit's ServicesManager when JustAFK is enabled.
Example:
import org.bukkit.Bukkit;
import pt.captainratax.justafk.api.JustAfkApi;
JustAfkApi api = Bukkit.getServicesManager().load(JustAfkApi.class);
boolean playerIsAfk = api != null && api.isAfk(player);
Available methods:
boolean isAfk(Player player);
boolean isAfk(UUID playerId);
Both methods read the same AFK state maintained internally by JustAFK.
An unknown or offline UUID that is not currently tracked returns false. Querying it does not create a new tracking session.
The service is unregistered when the plugin itself is disabled or unloaded by the server. Consumer plugins should always handle the provider being unavailable.
Integration notice
The API creates an official integration surface, but other plugins do not discover it automatically.
A plugin that wants to recognize JustAFK players must explicitly retrieve and use JustAfkApi. JustAFK does not include direct integrations with Sleeper, Essentials, or other third-party AFK consumers.
AFK state-change event
Other plugins can listen for:
pt.captainratax.justafk.api.event.PlayerAfkStateChangeEvent
The event provides:
Player getPlayer();
boolean isAfk();
boolean isAutomatic();
The event is a notification of a completed state change and is not cancellable.
It is published only when the AFK state actually changes:
- Active to AFK
- AFK to active
Repeated commands, activity calls, or internal checks that leave the player in the same state do not publish duplicate events.
isAutomatic() is true only when an inactivity timeout moves the player into AFK.
It is false for:
- Manual AFK changes
- Manual returns to active
- Activity-driven returns to active
- Active transitions produced when the plugin is disabled through its runtime configuration
Disabling JustAFK through the enabled configuration clears tracked AFK states and publishes the corresponding active events.
Player disconnection and plugin shutdown remove tracking without publishing an artificial active-player transition.
Commands
| Command |
Default access |
Permission |
Description |
/afk |
All players |
justafk.use |
Toggle your own AFK state. |
/afk <player> |
Operators |
justafk.use and justafk.others |
Toggle an online player's AFK state. |
/afk <player> on |
Operators |
justafk.use and justafk.others |
Mark an online player as AFK. |
/afk <player> off |
Operators |
justafk.use and justafk.others |
Remove an online player's AFK state. |
/afk <player> toggle |
Operators |
justafk.use and justafk.others |
Toggle an online player's AFK state explicitly. |
/justafk |
Operators |
justafk.config |
Show the command help. |
/justafk help |
Operators |
justafk.config |
Show the command help. |
/justafk status |
Operators |
justafk.config |
Display the active configuration. |
/justafk reload |
Operators |
justafk.config |
Reload config.yml. |
/justafk set enabled <on|off> |
Operators |
justafk.config |
Enable or disable JustAFK globally. |
/justafk set automatic-afk <on|off> |
Operators |
justafk.config |
Enable or disable automatic AFK detection. |
/justafk set timeout <seconds> |
Operators |
justafk.config |
Change the automatic AFK timeout. |
/justafk set announcements <all|ops|none> |
Operators |
justafk.config |
Change the announcement audience. |
/justafk set playerlist <on|off> |
Operators |
justafk.config |
Enable or disable the TAB prefix. |
The /jafk alias can be used instead of /justafk.
Running /afk <player> without on, off, or toggle defaults to toggle.
The target player must be online. Player names are matched exactly without case sensitivity.
When another person changes a player's AFK state, the target receives a private notification identifying who made the change.
Both /afk and /justafk include tab completion.
When JustAFK is globally disabled, only the help, status, reload, and configuration commands remain operational.
Permissions
| Permission |
Default |
Description |
justafk.use |
Everyone |
Allows players to use /afk on themselves. |
justafk.others |
Operators |
Allows changing another online player's AFK state. |
justafk.config |
Operators |
Allows access to all /justafk administrative commands. |
justafk.admin |
Operators |
Grants all JustAFK permissions. |
justafk.admin includes:
justafk.use
justafk.others
justafk.config
Because the root /afk command requires justafk.use, a moderator who should manage other players needs both justafk.use and justafk.others.
LuckPerms examples
LuckPerms is optional. JustAFK uses the standard Bukkit permission system and works with permission plugins that manage Bukkit permissions.
Allow the default group to toggle its own AFK state:
/lp group default permission set justafk.use true
Allow a moderator group to manage other players:
/lp group moderator permission set justafk.use true
/lp group moderator permission set justafk.others true
Give an administrator group every JustAFK permission:
/lp group admin permission set justafk.admin true
Allow a staff group to manage the configuration without granting every permission:
/lp group staff permission set justafk.config true
Remove self-service AFK access from the default group:
/lp group default permission set justafk.use false
Replace default, moderator, admin, or staff with the group names used by your server.
The ops announcement audience refers to players who are actual Minecraft server operators. It does not include players merely because they have justafk.admin through LuckPerms.
Configuration
The default config.yml is:
# Enables or disables JustAFK as a whole.
# When disabled, only the help, status, reload, and configuration commands work.
enabled: true
# Marks inactive players as AFK automatically after the configured timeout.
# Manual AFK commands remain available when this is disabled.
automatic-afk-enabled: true
# Time without recognized player activity before a player is marked as AFK.
# Activity includes movement input, chat messages, breaking or placing blocks,
# player-driven fishing actions, block, item, and entity interactions, and item use.
# The default is 300 seconds (5 minutes).
inactivity-timeout-seconds: 300
announcements:
# Available values: all, ops, none
audience: all
player-list:
# Adds a grey AFK duration before the player's existing tab-list name.
enabled: true
format: "&7[AFK {duration}]&r "
messages:
# Legacy colour codes using '&' are supported.
command-prefix: "&8[&7JustAFK&8]&r "
became-afk: "&8[&7JustAFK&8]&r &7{player} is now AFK."
became-active: "&8[&7JustAFK&8]&r &7{player} is no longer AFK."
Configuration options
| Option |
Default |
Accepted values |
Description |
enabled |
true |
true or false |
Enables or disables JustAFK globally. |
automatic-afk-enabled |
true |
true or false |
Enables or disables automatic AFK detection independently. |
inactivity-timeout-seconds |
300 |
A whole number of at least 1 |
Time without recognized activity before automatic AFK. |
announcements.audience |
all |
all, ops, none |
Controls who receives AFK entry and exit announcements. |
player-list.enabled |
true |
true or false |
Enables the TAB player-list prefix. |
player-list.format |
&7[AFK {duration}]&r |
Text containing {duration} |
Controls the prefix displayed before the existing player-list name. |
messages.command-prefix |
JustAFK prefix |
Any text |
Prefix used for command responses. |
messages.became-afk |
Default AFK message |
Any text |
Message sent when a player enters AFK. |
messages.became-active |
Default active message |
Any text |
Message sent when a player leaves AFK. |
Configurations created by earlier JustAFK releases remain compatible.
JustAFK 1.3.0 does not add, remove, or rename any configuration key.
The enabled and automatic-afk-enabled options introduced in 1.1.0 still default to true when absent from an older configuration. Existing configuration files do not need to be deleted or regenerated.
Announcement audiences
all — sends announcements to every online player
ops — sends announcements only to online server operators
none — disables AFK announcements
The same audience is used for both entering and leaving AFK.
Placeholders
{duration} is required in player-list.format
{player} can be used in the AFK entry and exit messages
Legacy colour codes using & are supported.
Configuration commands validate and save their changes to config.yml immediately.
On server APIs that support YAML comment parsing, comments are preserved when configuration commands save the file.
When editing config.yml manually, run:
/justafk reload
Requirements
JustAFK 1.3.0
- Minecraft 1.21.3–26.3
- A supported Bukkit-compatible Java Edition server, within the compatibility limits above
- Java 21 or newer
- No client mod
- No runtime dependencies
The server may require a newer Java version depending on its Minecraft version. Paper 26.1 and newer, including Paper 26.3, require Java 25.
JustAFK 1.0.1
Use version 1.0.1 for supported servers below Minecraft 1.21.3.
- Java 8-compatible plugin bytecode
- Position-based activity detection
- No input-aware AFK protection
- No expanded activity events
- No public AFK API or state-change event
- No global or automatic-AFK toggles
LuckPerms is supported through standard Bukkit permissions but is not required.
Installation
Minecraft 1.21.3–26.3
- Download
JustAFK-1.3.0.jar.
- Stop the server. When updating, back up the current configuration and remove the previous JustAFK JAR.
- Place the JAR inside the server's
plugins directory, keeping only one JustAFK JAR.
- Start the server and check the JustAFK enable message.
- Open
plugins/JustAFK/config.yml to review the configuration.
- Run
/justafk reload after making manual configuration changes.
- Configure additional permissions with LuckPerms if needed.
Minecraft versions below 1.21.3
- Download JustAFK 1.0.1.
- Place
JustAFK-1.0.1.jar inside the server's plugins directory.
- Start or restart the server.
- Configure the plugin normally.
Do not install JustAFK 1.3.0 on a server below Minecraft 1.21.3.
When using BungeeCord, Velocity, or Waterfall, install JustAFK on each backend Bukkit-compatible server where AFK detection is required. Do not place it in the proxy's plugin directory.
Validation
JustAFK 1.3.0 has been validated through:
- 43 automated tests
- Individual tests for all seven movement-input flags
- Short input tap tests
- Held input polling tests
- Block breaking and placement activity tests
- Player-driven fishing activity tests
- Server-generated fishing bite exclusion tests
- Block, item, and entity interaction tests
- Asynchronous chat activity tests
- Cancelled chat and interaction event tests
- AFK-to-active activity transition tests
- Public API tests for
Player and UUID lookups
- Unknown UUID queries verified not to create tracking state
- Automatic and manual AFK event metadata tests
- Duplicate AFK state-change event prevention tests
- Inactivity timeout tests
- External movement regression tests
- Global plugin disable tests
- Automatic-AFK disable tests
- Paper 26.3 build 230 stable primary compilation
- Spigot 1.21.3 compatibility compilation
- Paper and Spigot bytecode parity validation
- Java 21 bytecode validation
- Runtime dependency validation
- Plugin version, API baseline, and JAR manifest metadata checks
./gradlew clean build passed with JDK 25.0.5. All 43 automated tests pass with zero failures, errors, or skipped tests.
The supported version range does not mean that every intermediate Minecraft or server-platform release has been individually runtime-tested. No real-server runtime tests were performed for this update. Before deployment, validate activity detection, automatic and manual AFK transitions, commands, permissions, announcements, tab-list integration, configuration reload, and shutdown on your intended server build. On Folia, also validate scheduling across region changes and player disconnects.
Frequently asked questions
Does JustAFK kick inactive players?
No. JustAFK only marks players as AFK, announces state changes, and optionally displays a TAB prefix.
Do players need to install anything?
No. JustAFK is completely server-side.
Does fishing count as activity?
Yes. Player-driven fishing actions restart the timer and immediately remove AFK.
A server-generated fishing bite alone does not count because it is not new player input.
Does writing in chat remove AFK?
Yes. Submitting a chat message removes AFK and restarts the inactivity timer.
This still applies when another plugin later cancels the message.
Do cancelled interactions count as activity?
Yes. A recognized action from the player counts even when another plugin cancels its result.
Does looking around reset the timer?
No. Camera movement, yaw, and pitch do not count as movement input.
Does knockback remove AFK?
No. JustAFK 1.1.0 and newer use movement input instead of position changes.
Knockback, entity pushes, arrows, explosions, water, and other external position changes do not remove AFK unless the player is also sending movement input.
JustAFK 1.0.1 uses position-based activity detection, so external movement may remove AFK on that version.
Does death reset AFK?
No. Death and respawn preserve the AFK state and its displayed duration.
Disconnecting and reconnecting starts a new session and resets the AFK state.
Does holding a movement key count as activity?
Yes. JustAFK periodically checks the current input, so an input that remains held continues to count as activity.
Can automatic AFK detection be disabled?
Yes. Set:
automatic-afk-enabled: false
Or run:
/justafk set automatic-afk off
Players can continue using manual AFK while automatic detection is disabled. Recognized activity still removes a manually applied AFK state.
Can JustAFK be disabled without removing the JAR?
Yes. Set:
enabled: false
Or run:
/justafk set enabled off
Help, status, reload, and configuration commands remain available.
Can announcements be disabled?
Yes. Set announcements.audience to none or run:
/justafk set announcements none
Can the TAB prefix be disabled?
Yes. Run:
/justafk set playerlist off
Can messages and colours be customized?
Yes. Edit the message and player-list settings in config.yml. Legacy & colour codes are supported.
Can another plugin check whether a player is AFK?
Yes. JustAFK 1.3.0 provides JustAfkApi through Bukkit's ServicesManager and publishes PlayerAfkStateChangeEvent.
The other plugin must explicitly support and consume this API. Installing JustAFK alone does not automatically add compatibility to unrelated AFK consumers.
Which version should I use?
Use JustAFK 1.3.0 on Minecraft 1.21.3–26.3, within the platform compatibility limits above.
Use JustAFK 1.0.1 on supported Minecraft versions below 1.21.3.
Which Java version do I need?
JustAFK 1.3.0 requires Java 21 or newer.
Your Minecraft server may require a newer version. Paper 26.1 and newer, including Paper 26.3, require Java 25.
JustAFK 1.0.1 uses Java 8-compatible bytecode for compatibility with older servers.
Is every supported Minecraft version individually tested?
No.
JustAFK 1.3.0 is built against Paper 26.3 and compatibility-compiled against Spigot 1.21.3.
Compatibility with intermediate releases is based on the shared Bukkit API and build-time compatibility validation. No real-server runtime tests were performed for this update, and Purpur/Folia compatibility depends on available builds preserving the required APIs and scheduler contracts.
Does JustAFK require ProtocolLib, Vault, PlaceholderAPI, or another plugin?
No. JustAFK has no external runtime dependencies.
Can JustAFK run on a proxy?
No. BungeeCord, Velocity, and Waterfall are proxy platforms.
Install JustAFK on the backend Paper, Purpur, Spigot, CraftBukkit, or Folia server instead.
Source and support
JustAFK is open source and licensed under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧