COWMODSКаталог модов

JustAFK

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

Автор: CaptainRatax2902обновлён 29 окт. 2026 г.
УправлениеОбщениеУтилиты

Описание

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 listChat announcements
A grey JustAFK duration prefix displayed before an AFK player's name in the TAB player listJustAFK chat messages announcing when a player enters and leaves AFK

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.

PlatformAPI compatibility rangeStatus
Paper1.21.3–26.3API-compatible; Paper 26.3 is the primary build target
Purpur1.21.3–26.3Expected compatibility as a Paper fork, where compatible builds exist
Folia1.21.3–26.3Uses native Folia schedulers where server builds preserve the required APIs and scheduler contracts
Spigot1.21.3–26.3Compatibility-compiled against Spigot 1.21.3
CraftBukkit1.21.3–26.3Compatibility based on the shared Bukkit API
SpongeNot supportedUses a different plugin API and lifecycle
BungeeCord, Velocity, WaterfallNot supportedProxy 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:

PlatformJustAFK 1.0.1 declared compatibility
Paper1.8.8–26.2
Purpur1.14.1–26.2
Folia1.19.4–26.2
Spigot / CraftBukkit1.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

CommandDefault accessPermissionDescription
/afkAll playersjustafk.useToggle your own AFK state.
/afk <player>Operatorsjustafk.use and justafk.othersToggle an online player's AFK state.
/afk <player> onOperatorsjustafk.use and justafk.othersMark an online player as AFK.
/afk <player> offOperatorsjustafk.use and justafk.othersRemove an online player's AFK state.
/afk <player> toggleOperatorsjustafk.use and justafk.othersToggle an online player's AFK state explicitly.
/justafkOperatorsjustafk.configShow the command help.
/justafk helpOperatorsjustafk.configShow the command help.
/justafk statusOperatorsjustafk.configDisplay the active configuration.
/justafk reloadOperatorsjustafk.configReload config.yml.
/justafk set enabled <on|off>Operatorsjustafk.configEnable or disable JustAFK globally.
/justafk set automatic-afk <on|off>Operatorsjustafk.configEnable or disable automatic AFK detection.
/justafk set timeout <seconds>Operatorsjustafk.configChange the automatic AFK timeout.
/justafk set announcements <all|ops|none>Operatorsjustafk.configChange the announcement audience.
/justafk set playerlist <on|off>Operatorsjustafk.configEnable 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

PermissionDefaultDescription
justafk.useEveryoneAllows players to use /afk on themselves.
justafk.othersOperatorsAllows changing another online player's AFK state.
justafk.configOperatorsAllows access to all /justafk administrative commands.
justafk.adminOperatorsGrants 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

OptionDefaultAccepted valuesDescription
enabledtruetrue or falseEnables or disables JustAFK globally.
automatic-afk-enabledtruetrue or falseEnables or disables automatic AFK detection independently.
inactivity-timeout-seconds300A whole number of at least 1Time without recognized activity before automatic AFK.
announcements.audienceallall, ops, noneControls who receives AFK entry and exit announcements.
player-list.enabledtruetrue or falseEnables 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-prefixJustAFK prefixAny textPrefix used for command responses.
messages.became-afkDefault AFK messageAny textMessage sent when a player enters AFK.
messages.became-activeDefault active messageAny textMessage 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

  1. Download JustAFK-1.3.0.jar.
  2. Stop the server. When updating, back up the current configuration and remove the previous JustAFK JAR.
  3. Place the JAR inside the server's plugins directory, keeping only one JustAFK JAR.
  4. Start the server and check the JustAFK enable message.
  5. Open plugins/JustAFK/config.yml to review the configuration.
  6. Run /justafk reload after making manual configuration changes.
  7. Configure additional permissions with LuckPerms if needed.

Minecraft versions below 1.21.3

  1. Download JustAFK 1.0.1.
  2. Place JustAFK-1.0.1.jar inside the server's plugins directory.
  3. Start or restart the server.
  4. 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.

Галерея

JustAFK TAB player's list exampleJustAFK chat message example

Последние версии

Все версии →
release

1.3.0

1.3.0
29 окт. 2026 г.17Minecraft: 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## JustAFK 1.3.0 - Updated the compile target to stable Paper API `26.3.build.230-stable`. - Retained the Minecraft 1.21.3–26.3 API range in the same JAR. - Preserved existing AFK detection, commands, permissions, configuration, messages, announcements, tab-list behavior, and public API. - Updated requirements, installation, and build documentation. - No configuration migration or additional runtime dependencies required. The plugin retains Java 21 bytecode. Paper 26.1 and newer require Java 25. Purpur and Folia compatibility depends on available builds preserving the required APIs and scheduler contracts. Validation: all 43 tests passed, together with Spigot 1.21.3 compilation, Paper/Spigot bytecode parity, Java 21 bytecode, JAR metadata, and runtime dependency checks. No real-server runtime tests were performed for this update. Validate AFK activity, announcements, tab-list integration, and Folia scheduling on your intended server build.
release

1.2.0

1.2.0
25 авг. 2026 г.177Minecraft: 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## 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](https://modrinth.com/plugin/justafk/version/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: ```java pt.captainratax.justafk.api.JustAfkApi ``` Other plugins can retrieve it through Bukkit's `ServicesManager`: ```java 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: ```java 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: ```java 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: | Platform | Versions | | --- | --- | | Bukkit / CraftBukkit | 1.21.3–26.2 | | Spigot | 1.21.3–26.2 | | Paper | 1.21.3–26.2 | | Purpur | 1.21.3–26.2 | | Folia | 1.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
release

1.1.0

1.1.0
30 июл. 2026 г.23Minecraft: 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## JustAFK 1.1.0 JustAFK 1.1.0 introduces two major improvements: complete runtime control over the plugin and a new input-aware AFK detection system. Player activity is no longer inferred from changes in position. JustAFK now detects actual movement input reported by the player, preventing external forces from incorrectly removing AFK. > JustAFK 1.1.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**. > > Version 1.0.1 remains compatible with older Minecraft versions but uses the previous position-based activity detection. Entity pushes, knockback, arrows, and other external movement may therefore reset the inactivity timer or remove AFK. ### Global plugin control A new `enabled` configuration option can completely enable or disable JustAFK: - `enabled: true` — the plugin operates normally - `enabled: false` — all AFK functionality is disabled The option can also be changed at runtime: - `/justafk set enabled on` - `/justafk set enabled off` When the plugin is disabled: - Players are no longer tracked for AFK activity - 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 are restored - AFK announcements and duration updates stop Configuration-related commands remain available: - `/justafk help` - `/justafk status` - `/justafk reload` - `/justafk set ...` This allows administrators to inspect, configure, and enable the plugin again without restarting the server. ### Independent automatic AFK control Automatic AFK detection can now be controlled separately through: - `automatic-afk-enabled: true` - `automatic-afk-enabled: false` The option can also be changed at runtime: - `/justafk set automatic-afk on` - `/justafk set automatic-afk off` When automatic AFK detection is disabled: - Inactivity does not place players into AFK automatically - `/afk` remains available - Administrators can still control another player's AFK state - Movement input still removes a manually applied AFK state - Announcements and player-list prefixes continue working for manual AFK states This makes it possible to use JustAFK exclusively as a manual AFK plugin. ### Input-aware activity detection JustAFK now uses `PlayerInputEvent` and current-input polling instead of detecting activity through position changes. The following inputs count as player activity: - Forward - Backward - Left - Right - Jump - Sneak - Sprint When movement input is detected: - The inactivity timer is restarted - An AFK player immediately becomes active - The AFK player-list prefix is removed - The configured active announcement is sent Immediate input events detect short key presses, while periodic polling keeps the player active while a movement key remains held. ### External movement no longer removes AFK Position changes without movement input no longer restart the inactivity timer. Players remain 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 The AFK state and displayed duration are preserved during these events unless the player sends movement input. Looking around with the mouse also remains ignored. ### Configuration compatibility Configuration files created by JustAFK 1.0.0 and 1.0.1 remain compatible. If the new options are missing, both default to `true`: - `enabled: true` - `automatic-afk-enabled: true` Existing configuration files do not need to be deleted or regenerated. ### Compatibility changes JustAFK 1.1.0 supports: | Platform | Versions | | --- | --- | | Bukkit / CraftBukkit | 1.21.3–26.2 | | Spigot | 1.21.3–26.2 | | Paper | 1.21.3–26.2 | | Purpur | 1.21.3–26.2 | | Folia | 1.21.3–26.2, where a server build is available | The plugin is built against Paper 26.2 and compatibility-compiled against Spigot 1.21.3. Both compilations must produce identical class files before the build passes. ### Support for older Minecraft versions Servers below Minecraft 1.21.3 can continue using [JustAFK 1.0.1](https://modrinth.com/plugin/justafk/version/1.0.1). Version 1.0.1 supports: | Platform | Versions | | --- | --- | | 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 | JustAFK 1.0.1 uses Java 8-compatible bytecode but does not include: - Input-aware movement detection - Protection against AFK removal caused by external movement - The global `enabled` option - The independent `automatic-afk-enabled` option ### Java requirements JustAFK 1.1.0 uses Java 21 bytecode and requires Java 21 or newer. The server may require a newer Java version depending on its Minecraft version. For example, Paper 26.2 requires Java 25. ### Technical changes - Replaced `PlayerMoveEvent` activity tracking with `PlayerInputEvent` - Added current-input polling through `Player#getCurrentInput()` - Removed position comparisons from the AFK monitor - Removed the obsolete position snapshot implementation - Added global and automatic-AFK configuration flags - Added runtime commands and tab completion for both flags - Set `api-version` to `1.21.3` - Changed the bytecode target from Java 8 to Java 21 - Added compatibility compilation against Spigot 1.21.3 - Maintained Paper 26.2 as the primary API target - Updated the README, default configuration, build checks, and tests - No runtime dependencies added ### Validation - 25 automated tests passed - All seven movement inputs tested individually - Short input taps tested - Held movement input polling tested - External position changes verified not to affect AFK timing - Global plugin disable behaviour tested - Automatic AFK disable behaviour tested - Spigot 1.21.3 compatibility compilation passed - Paper 26.2 primary compilation passed - Paper and Spigot bytecode parity verified - Java 21 bytecode verified - Manually tested successfully on a 26.2 server
release

1.0.1

1.0.1
28 июл. 2026 г.49Minecraft: 1.8.8, 1.8.9, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.10, 1.10.1, 1.10.2, 1.11, 1.11.1, 1.11.2, 1.12, 1.12.1, 1.12.2, 1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## JustAFK 1.0.1 This release significantly expands backwards compatibility while keeping Paper 26.2 as the primary platform. ### Compatibility - **Paper:** 1.8.8–26.2 - **Purpur:** 1.14.1–26.2 - **Folia:** 1.19.4–26.2 - **Spigot and Bukkit:** 1.8.8–26.2, with best-effort runtime support - **Sponge and proxy platforms:** Not supported ### Changes - Targeted Java 8 bytecode to support older Minecraft server versions. - Kept Paper 26.2 as the primary compilation target. - Added compatibility compilation against the Spigot 1.8.8 API. - Added bytecode comparison between the Paper and legacy API builds. - Improved compatibility with older Bukkit configuration APIs. - Preserved Folia-aware scheduler support without introducing a hard Folia dependency. - Added compatibility and regression tests. - Confirmed that the plugin has no external runtime dependencies. - Preserved the existing AFK behaviour, commands, permissions and configuration format. ### Validation The release build passed all 11 automated tests and compatibility checks. Runtime smoke tests were completed on: - Paper 1.8.8 - Paper 26.2 - Purpur 26.2 - Folia 26.1.2, the latest public Folia build available during testing A public Folia 26.2 server build was not available during testing. The plugin uses the appropriate Folia scheduler API and is prepared for 26.2, but that specific server version has not yet been runtime-tested. ### Updating This is a drop-in update from JustAFK 1.0.0. Existing configuration files remain compatible. The plugin JAR uses Java 8 bytecode, but you must still use the Java version required by your chosen server. Paper 26.2 requires Java 25.
release

1.0.0

1.0.0
27 июл. 2026 г.24Minecraft: 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
# JustAFK 1.0.0 The first public release of JustAFK, a lightweight and configurable server-side AFK plugin for Minecraft 26.2. ## Added - Automatic AFK detection after a configurable inactivity period - Default inactivity timeout of 300 seconds - Position-only activity detection - Camera rotation does not reset the inactivity timer - Immediate AFK removal when a player changes position - Manual AFK toggling with `/afk` - Administrative control over other online players - Explicit `on`, `off`, and `toggle` actions - Configurable announcement audiences: `all`, `ops`, and `none` - Optional AFK duration prefix in the TAB player list - Whole-minute duration labels below one hour - Whole-hour duration labels from one hour onwards - Preservation of existing player-list names where possible - Immediate configuration saving through administrative commands - Runtime configuration reloads - Command tab completion - Legacy `&` colour-code support - Folia-aware global and entity scheduling - Bukkit permission support for permission managers such as LuckPerms ## Commands - `/afk` - `/afk <player> [on|off|toggle]` - `/justafk help` - `/justafk status` - `/justafk reload` - `/justafk set timeout <seconds>` - `/justafk set announcements <all|ops|none>` - `/justafk set playerlist <on|off>` The `/jafk` alias is also available. ## Permissions - `justafk.use` — toggle your own AFK state - `justafk.others` — manage another online player's AFK state - `justafk.config` — access administrative configuration commands - `justafk.admin` — grant every JustAFK permission ## Compatibility - Paper 26.2 — primary platform - Purpur 26.2 — supported as a Paper fork - Folia 26.2 — Folia-aware scheduler integration included - Spigot and Bukkit — best-effort compatibility, not yet declared as supported loaders - Sponge and proxy platforms — not supported ## Requirements - Minecraft Java Edition 26.2 - Java 25 - Server-side installation only - No required dependencies - No client installation required ## Build and tests - Built with Gradle 9.1 - Compiled against Paper API `26.2.build.84-stable` - 7 tests executed successfully - 0 failures - 0 errors - 0 skipped ## Notes - JustAFK marks players as AFK but does not kick, freeze, teleport, or punish them. - AFK states are session-based and reset when a player disconnects. - Paper is the primary and most extensively validated platform. - Full server restarts are recommended instead of hot plugin reloaders. - Changing only `player-list.format` while a player is already AFK may not become visible until the displayed duration changes.