▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
JustAFK

JustAFK

A lightweight, configurable, server-side AFK plugin with activity-aware detection and a public API for Paper, Purpur, Folia, Spigot, and Bukkit.

Оцените первым
76
1

1.2.0

Release25.08.2026

Список изменений

JustAFK 1.2.0

JustAFK 1.2.0 expands activity detection beyond movement and introduces an official public API and Bukkit event for integrations with other plugins.

This release prevents stationary players who are still performing genuine actions—such as fishing, interacting with blocks, or writing in chat—from being incorrectly marked as AFK.

JustAFK 1.2.0 requires Minecraft 1.21.3 or newer and Java 21 or newer.

Servers below Minecraft 1.21.3 should continue using JustAFK 1.0.1.

Expanded activity detection

The following actions now restart the inactivity timer and return an AFK player to active:

  • Breaking blocks
  • Placing blocks
  • Player-driven fishing actions
  • Interacting with blocks
  • Interacting with or using items
  • Interacting with entities
  • Interacting with a precise point on an entity
  • Submitting chat messages

Existing movement-input detection remains unchanged:

  • Forward
  • Backward
  • Left
  • Right
  • Jump
  • Sneak
  • Sprint

All activity handling is now centralized in the AFK manager, ensuring that each listener uses the same timer and state-transition logic.

Chat messages now remove AFK

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 safely transferred from the asynchronous event to the appropriate Bukkit or Folia player scheduler.

Cancelled player actions count as activity

A recognized player action counts as activity even when another plugin cancels its result.

This includes actions such as:

  • Attempting to break or place a block in a protected area
  • Interacting with a protected block or entity
  • Attempting to use a restricted item
  • Submitting a message cancelled by a chat or moderation plugin

The action result may be prevented, but the player has still demonstrated that they are present and active.

Improved fishing behavior

Player-driven fishing actions now count as activity, preventing actively fishing players from being marked as AFK simply because they remain stationary.

A server-generated fishing bite alone is deliberately ignored because it can happen without new player input.

Passive movement remains ignored

JustAFK continues to ignore position changes without movement input.

The following do not restart the inactivity timer or remove AFK by themselves:

  • Entity pushes and collisions
  • Knockback
  • Arrows
  • Explosions
  • Flowing water and bubble columns
  • Pistons
  • Gravity or falling
  • Passive vehicle movement
  • Server or plugin teleports
  • Death and respawn
  • Looking around

Physical block interactions such as pressure-plate activation are also not independently counted because they can be caused by passive or externally forced movement.

Public AFK API

JustAFK now provides an official read-only API:

pt.captainratax.justafk.api.JustAfkApi

Other plugins can retrieve it through Bukkit's 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);

Available methods:

boolean isAfk(Player player);
boolean isAfk(UUID playerId);

The API uses the same state already maintained internally by JustAFK.

An unknown or offline UUID that is not currently tracked returns false, and querying it does not create new tracking state.

The service is registered when JustAFK is enabled and unregistered when the plugin itself is disabled or unloaded. Consumers should handle the service being unavailable.

Public AFK state-change event

Other plugins can now listen for:

pt.captainratax.justafk.api.event.PlayerAfkStateChangeEvent

The event provides:

  • getPlayer() — the affected player
  • isAfk() — the player's new AFK state
  • isAutomatic() — whether an inactivity timeout caused the transition

The event is published only when the state actually changes:

  • Active to AFK
  • AFK to active

Repeated commands, activity calls, or internal updates that leave the player in the same state do not publish duplicate events. isAutomatic() is true only when the inactivity timeout moves a player into AFK. Manual transitions and activity-driven returns to active report false.

Disabling JustAFK through its runtime configuration publishes one corresponding active event for each tracked player whose AFK state is cleared.

Player disconnection and plugin shutdown remove tracking without publishing an artificial active transition.

Integration notice

This release provides the official integration surface needed by other plugins, but it does not automatically make every AFK-aware plugin recognize JustAFK.

Consumer plugins must explicitly retrieve and use JustAfkApi or listen for PlayerAfkStateChangeEvent.

No third-party runtime dependency or integration has been added.

Configuration compatibility

No configuration keys were added, removed, or renamed in JustAFK 1.2.0.

Existing configuration files remain compatible and do not need to be deleted or regenerated.

The default configuration comments now describe all recognized player activity instead of referring only to movement input.

Compatibility

JustAFK 1.2.0 supports:

PlatformVersions
Bukkit / CraftBukkit1.21.3–26.2
Spigot1.21.3–26.2
Paper1.21.3–26.2
Purpur1.21.3–26.2
Folia1.21.3–26.2, where a server build is available

The plugin is built against Paper 26.2 build 84 stable and compatibility-compiled against Spigot 1.21.3.

Both compilations must produce identical class files before the build passes.

The JAR uses Java 21 bytecode. The server may require a newer Java version for its Minecraft release; Paper 26.2 requires Java 25.

No new runtime dependencies were added.

Updating from 1.1.0

  1. Stop the server.
  2. Replace the existing JustAFK JAR with JustAFK-1.2.0.jar.
  3. Start the server.
  4. Keep the existing configuration or review the updated default comments.

No configuration migration is required.

Technical changes

  • Added centralized AfkManager.recordActivity(Player) handling
  • Added activity listeners for block breaking and placement
  • Added player-driven fishing activity detection
  • Added block and item interaction activity detection
  • Added generic and precise entity interaction activity detection
  • Added submitted chat messages as activity
  • Continued monitoring relevant cancelled events
  • Excluded server-generated fishing bites from activity
  • Excluded physical interactions such as pressure plates from independent activity
  • Added the public JustAfkApi interface
  • Added Player and UUID AFK state lookups
  • Registered the API through Bukkit's ServicesManager
  • Added the public PlayerAfkStateChangeEvent
  • Added automatic/manual transition metadata
  • Added duplicate event suppression
  • Preserved Folia-aware state changes and scheduling
  • Updated the project version to 1.2.0
  • Updated the README and default configuration comments
  • Added official Modrinth and CurseForge links to the repository README
  • Added no runtime dependencies

Validation

  • 43 automated tests passed
  • 0 failures, errors, or skipped tests
  • New activity listener behavior tested
  • AFK-to-active transitions caused by activity tested
  • Asynchronous and cancelled chat behavior tested
  • Cancelled interaction events tested
  • Player-driven fishing and server-generated bite behavior tested
  • Public API behavior tested
  • Unknown UUID lookups verified not to create state
  • State-change event metadata tested
  • Duplicate event suppression tested
  • Paper 26.2 primary compilation passed
  • Spigot 1.21.3 compatibility compilation passed
  • Paper and Spigot bytecode parity verified
  • Java 21 bytecode verified
  • Runtime dependency validation passed

Файлы

JustAFK-1.2.0.jar(41.38 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.2.0

Загрузчики

Bukkit
Folia
Paper
Purpur
Spigot

Версии игры

1.21.3–26.2

Загрузок

44

Дата публикации

25.08.2026

Загрузил

ID версии

Главная