Skip to content

BetterAFK

By BetterPlugins

AFK plugin for Paper, Purpur & Folia 26.x: holograms, auto-AFK, kick, own AFK settings for every player, AFK players don't block sleeping. Lightweight, PlaceholderAPI support.

2k downloads Updated
26.3 26.2

No ratings yet

Be the first to rate it.

Rate it

Community listing page

Community listing page, reviews may not be monitored by the author.

About

Description

BetterAFK

Servers Players Downloads Version Game versions Runs on Languages Geyser

A stylish AFK plugin for Paper, Purpur and Folia 26.x with holograms above AFK players, auto-AFK, AFK kick and much more. Players choose their own AFK settings, AFK players don't block sleeping, and every feature can be turned off. Fully customizable, in 9 languages. Check the gallery.

Preview

Preview

Features

  • /afk to go AFK manually, auto-AFK after a configurable time
  • Holograms above AFK players (with the AFK time) and a rotating symbol - can start one line higher if you show ranks above the name
  • Tab prefix for AFK players
  • Kick after a configurable time AFK - with a bypass permission for your team, a countdown in the action bar before the kick and optionally only when the server is full
  • Sleeping: AFK players don't count - the night is skipped when everybody else sleeps
  • Own settings for every player (saved, kept after a restart): own auto-AFK time, hide the AFK messages of others, choose if you are kicked
  • /afk list - who is AFK and since when
  • Immortality: AFK players become invulnerable after a delay
  • Walk to leave AFK - just move again, no /afk needed
  • Position lock (optional): AFK players can't be pushed away by players, mobs or water - and with walk_to_leave a deliberate step (W, A, S, D or jump) still ends AFK
  • Vanish support: no messages or holograms for vanished players
  • Optional permission to go AFK
  • PlaceholderAPI support (see below)
  • Folia support - one jar for Paper, Purpur and Folia
  • MiniMessage formatting everywhere (chat, action bar, holograms, tab): gradients, hex colors - classic & codes still work
  • English, German, French, Spanish, Polish, Russian, Portuguese, Turkish, Chinese, Italian, Dutch, Ukrainian, Japanese, Vietnamese, Korean, Czech and Indonesian included, add your own language with one file
  • Lightweight: display entities instead of armor stands, holograms only move when the player moves, nothing is saved to the world (no leftover holograms after a crash)
  • Optional auto update from Modrinth (off by default) - new config options are added automatically, your values are kept

Commands & permissions

  • /afk - toggle AFK mode
  • /afk list - all AFK players and since when
  • /afk timer <seconds> / reset / off - your own time until auto-AFK
  • /afk notifications on|off - show or hide the AFK messages about other players
  • /afk kick on|off - choose if you are kicked when AFK too long (if the server allows it)
  • /afk help - all commands
  • /betterafk reload - reloads config and messages

Every command can be turned off in the config.yml - disabled ones don't appear in the tab completion.

Permission Default
betterafk.use OP go AFK - only checked if afk.require_permission: true
betterafk.kick.bypass nobody never kicked for being AFK (kick.bypass_permission)
betterafk.admin OP all admin rights (includes betterafk.reload)
betterafk.reload OP /betterafk reload
PlaceholderAPI placeholders

Useful if other plugins change the tab list or the scoreboard - the AFK data can be shown there too. Requires PlaceholderAPI.

  • %betterafk_afk_status% - the AFK tab prefix if the player is AFK
  • %betterafk_invulnerability_status% - the invulnerable text if the player is invulnerable
  • %betterafk_afk_query% - true or false
  • %betterafk_afk_minutes% - minutes the player is AFK (empty if not AFK)

PlaceholderAPI placeholders can also be used inside all BetterAFK messages.

Bedrock players (Geyser)

Everything works for Bedrock players: /afk, auto-AFK, holograms, kick countdown and walking to leave AFK (also with walk_to_leave). Bedrock Edition can't show the symbol above the holograms (a display entity) - with bedrock.enabled (default) Bedrock players see it on an invisible armor stand instead, a clock instead of the barrier. Java players don't notice any difference.

Requirements

  • Paper, Purpur or Folia 26.1 - 26.3
  • Java 25
  • Optional: PlaceholderAPI
  • Optional: Geyser / Floodgate - Bedrock players are supported

Bug report & support

If you need help or have a bug please contact me via discord (add hassanbwo). I will guarantee quick help - Thanks for supporting :)

config.yml

All times are in seconds.

# ==========================================
# BetterAFK – config.yml
# ==========================================
# Here you can customise all times and settings according to your wishes.
# All messages are in messages_en.yml / messages_de.yml (MiniMessage like <red> or <gradient:...> and & color codes)
# Times are measured in seconds (e.g. 5 minutes = 300 seconds)
# Check the plugin page for more information:
# https://modrinth.com/plugin/betterafk
# ==========================================
# If you need help or have a bug please contact me via discord (add hassanbwo).
# I will guarantee quick help - Thanks for supporting :)
# ==========================================


# Here you can change the time for when a player is automatically set afk (and if they should)
# Also if players should need a permission ("betterafk.use") to go AFK

afk:
  auto_timeout_enabled: true
  timeout: 180
  require_permission: false

# Here you can deactivate the tab prefix (the text is in the messages file)

tab_prefix:
  enabled: true

# Here you can deactivate the symbol (the barrier) over the holograms if you don't like it or skip one hologram space
# With "block" you can replace the barrier with any other item (e.g. CLOCK)
# if skip_one_hologram is set to true, the holograms start one hologram place higher (If displaying ranks or hearts above the name this is useful)

holograms:
  barrier: true
  block: BARRIER
  skip_one_hologram: false

# Bedrock players (Geyser / Floodgate): Bedrock Edition can't show the symbol above the holograms (display
# entities). With enabled: true they see it on an invisible armor stand instead (a clock instead of the
# barrier, which is invisible on Bedrock). Java players don't see it. The hologram texts work anyway.
# Only used if Geyser or Floodgate is installed.

kick:
  enabled: true
  time: 600
  bypass_permission: true
  warning_seconds: 30
  only_when_full: false
  full_percent: 90

# Here you can select whether you want to block the position of AFK players.
# false: AFK players can simply walk away to leave AFK mode (they can also be pushed by players, mobs or water).
# true:  AFK players can't be pushed away, but they have to type /afk to move again.
# walk_to_leave (only with enabled: true): AFK players still can't be pushed away, but pressing a movement key
#                (W, A, S, D or jump) ends AFK mode - no /afk needed.

lock_position:
  enabled: false
  walk_to_leave: false

# Here you can choose if a player should be invulnerable and immortal after a certain time (seconds) in afk mode
# hologram: show the extra "invulnerable" line above the player (text: immortality.status in the messages file)
# Note: a value of over 3 seconds is recommended to prevent players from exploiting this feature

immortality:
  enabled: true
  delay: 10
  hologram: true

# Settings every player can change for himself (saved in the player file, kept after a restart)
# timer:         /afk timer <seconds> - own time until auto-AFK, between min and max seconds; /afk timer reset
#                allow_off: also allow /afk timer off (no auto-AFK at all for this player)
# notifications: /afk notifications <on|off> - hide the "... is now AFK" chat messages about other players
# kick:          /afk kick <on|off> - players choose for themselves if they are kicked after kick.time

player_settings:
  timer:
    enabled: true
    min: 60
    max: 1800
    allow_off: false
  notifications: true
  kick: false

# AFK players don't count for sleeping: the night is skipped when all players who are not AFK sleep

sleep:
  ignore_afk_players: true

# /afk list - shows all AFK players and how long they are AFK

list:
  enabled: true

# Language of all messages: en (English), de (Deutsch), fr (Français), es (Español),
# pl (Polski), ru (Русский), pt (Português), tr (Türkçe), zh (简体中文), it (Italiano),
# nl (Nederlands), uk (Українська), ja (日本語), vi (Tiếng Việt), ko (한국어), cs (Čeština) or id (Bahasa Indonesia)
# The texts are in messages_en.yml / messages_de.yml and support MiniMessage (<red>, <gradient:...>)
# and the classic color codes (&c). You can add your own language, e.g. messages_hu.yml -> language: hu
# /betterafk reload (permission betterafk.reload) reloads config and messages.

bedrock:
  enabled: true

# Here you can select if a player should be kicked after a certain time (seconds)
# bypass_permission: players with the permission "betterafk.kick.bypass" are never kicked (e.g. team members)
# warning_seconds: countdown in the action bar before the kick (text: kick.warning in the messages file), 0 = no warning
# only_when_full: only kick AFK players when the server is almost full - when at least full_percent % of the
#                 slots are taken. AFK players who are over the time are kicked as soon as the server is that full.

language: en

# Updates from Modrinth: a newer version is always announced in the console.
# enabled: download new versions automatically. Downloads are checked with the SHA-512 checksum from Modrinth
#          and installed on the next server restart (plugins/update folder). Only releases for your
#          Minecraft version and server software (Paper, Purpur, Folia) are downloaded.
# major_versions: also download big updates (e.g. 2.x -> 3.0) automatically, otherwise they are only announced.
auto_update:
  enabled: false
  major_versions: false

messages_en.yml

All texts support MiniMessage (<red>, <bold>, <gradient:#ff5555:#ff55ff>Text</gradient>) and the classic & color codes. Leave a text empty ("") to disable it. Translations are included for German, French, Spanish, Polish, Russian, Portuguese, Turkish and Chinese - switch with language: de, fr, es, pl, ru, pt, tr or zh in the config.

# ==========================================
# BetterAFK - messages (English)
# ==========================================
# Formatting: MiniMessage - https://docs.advntr.dev/minimessage/format
#   Colors:    <red>, <gray>, <#ff8800>
#   Styles:    <bold>, <italic>, <underlined>
#   Gradients: <gradient:#ff5555:#ff55ff>Text</gradient>
#   Rainbow:   <rainbow>Text</rainbow>
# Classic color codes like &c, &l or &#ff8800 still work as well.
#
# Placeholders: %player% (name of the AFK player), %time% (minutes AFK), %unit% (minute/minutes)
# PlaceholderAPI placeholders can be used too (if PlaceholderAPI is installed).
#
# Select the language in config.yml (language: en). You can also create your own
# file, e.g. messages_fr.yml, and set "language: fr". Missing texts fall back to English.
# Leave a message empty ("") to disable it.
# ==========================================

afk:
  # Action bar when a player goes AFK
  action_bar: "<gray>You are now <red><bold>AFK</bold></red><gray>!"
  # Chat message for everyone
  chat_start: "<light_purple>%player%</light_purple> <gray>is now <red><bold>AFK</bold></red><gray>."
  chat_end: "<light_purple>%player%</light_purple> <gray>is no longer <red><bold>AFK</bold></red> <gray>after <red><bold>%time%</bold></red> <gray>%unit%."
  # Only for the player himself if he is vanished (no chat message, no holograms)
  vanished_start: "<gray>You are now <red><bold>AFK</bold></red><gray>. Since you're vanished, no messages or holograms will be displayed."
  vanished_end: "<gray>You were <red><bold>AFK</bold></red> <gray>for <red><bold>%time%</bold></red> <gray>%unit%."
  # afk.require_permission in config.yml
  no_permission: "<gray>You have no permission to go <red>AFK</red><gray>."

# Text above the AFK player (line1 is on top)
hologram:
  line1: "<red><bold>AFK</bold></red>"
  line2: "<gray>since %time% %unit%"

# Appended to the name in the tab list (tab_prefix.enabled in config.yml)
tab_prefix: " <red><bold>AFK</bold></red>"

units:
  singular: "minute"
  plural: "minutes"

kick:
  message: "<gray>You were <red>kicked</red> <gray>for being AFK too long!"
  # Countdown in the action bar before the kick (kick.warning_seconds in config.yml), %seconds% = seconds left
  warning: "<gray>You will be <red>kicked</red> <gray>for being AFK in <red><bold>%seconds%</bold></red> <gray>seconds - move to stay!"

lock_position:
  message: "<gray>You can no longer move because you have been marked as <red><bold>AFK</bold></red><gray>. Type <red>/afk</red> <gray>to move again."
  # with lock_position.walk_to_leave: true (config.yml)
  message_walk: "<gray>You have been marked as <red><bold>AFK</bold></red><gray>. Just walk to leave AFK mode."
  action_bar: "<gray>You cannot move <red><bold>while AFK</bold></red><gray>!"

immortality:
  message: "<gray>You are now <light_purple>invulnerable</light_purple> <gray>due to AFK mode!"
  # Extra hologram line while invulnerable (immortality.hologram in config.yml), "" = no line
  status: "<green>invulnerable"

commands:
  reload_success: "<gradient:#ff5555:#ff55ff><bold>BetterAFK</bold></gradient> <gray>configuration reloaded!"
  no_permission: "<red>You don't have permission to use this command."
  players_only: "<red>This command can only be used by players."
  # /afk with an unknown sub command
  afk_usage: "<gray>Usage: <red>/afk</red> <gray>%commands%"
  help: "<gradient:#ff5555:#ff55ff><bold>BetterAFK</bold></gradient> <gray>commands:<newline><red>/afk</red> <gray>- go AFK or come back<newline><red>/afk list</red> <gray>- who is AFK<newline><red>/afk timer [seconds|reset|off]</red> <gray>- your own auto-AFK time<newline><red>/afk notifications [on|off]</red> <gray>- show the AFK messages of others<newline><red>/afk kick [on|off]</red> <gray>- be kicked when AFK too long<newline><red>/betterafk reload</red> <gray>- reload config and messages (admin)"

# /afk list (list.enabled in config.yml)
list:
  header: "<gray>AFK players (<red>%count%</red><gray>):"
  entry: "<dark_gray>- <light_purple>%player%</light_purple> <gray>since <red>%time%</red> <gray>%unit%"
  empty: "<gray>Nobody is AFK right now."

# /afk timer, /afk notifications, /afk kick (player_settings in config.yml)
settings:
  timer_current: "<gray>You are set AFK automatically after <red>%seconds%</red> <gray>seconds."
  timer_current_off: "<gray>You are <red>not</red> <gray>set AFK automatically."
  timer_set: "<gray>You are now set AFK automatically after <red>%seconds%</red> <gray>seconds."
  timer_reset: "<gray>Your auto-AFK time is back to the server default (<red>%seconds%</red> <gray>seconds)."
  timer_off: "<gray>You are no longer set AFK automatically."
  usage_timer: "<gray>Usage: <red>/afk timer [%min%-%max%]</red> <gray>(seconds) or <red>/afk timer reset"
  usage_timer_off: "<gray>Usage: <red>/afk timer [%min%-%max%]</red> <gray>(seconds), <red>/afk timer off</red> <gray>or <red>/afk timer reset"
  usage_notifications: "<gray>Usage: <red>/afk notifications on|off"
  notifications_on: "<gray>You see the AFK messages of other players again."
  notifications_off: "<gray>You no longer see the AFK messages of other players."
  usage_kick: "<gray>Usage: <red>/afk kick on|off"
  kick_on: "<gray>You will be <red>kicked</red> <gray>again when you are AFK too long."
  kick_off: "<gray>You will no longer be kicked for being AFK."

More plugins by BetterPlugins

All for Paper, Purpur and Folia 26.x, in English, German, French, Spanish, Polish, Russian, Portuguese, Turkish, Chinese, Italian, Dutch, Ukrainian, Japanese, Vietnamese, Korean, Czech and Indonesian - see the whole BetterPlugins collection:

BetterTimber BetterTimber - Fell whole trees with one hit - protection-plugin safe
BannerForLabyMod BannerForLabyMod - Custom image banner above the tab list for LabyMod
BetterCarry BetterCarry - Carry and throw players, mobs and chests
BetterTimberEnchantment BetterTimberEnchantment - Timber enchantment for BetterTimber - enchanting table, villagers, loot
BetterRIP BetterRIP - Graves that keep your items in their slots and your experience
BetterSort BetterSort - Sort chests with one click, hotbar refill and quick stack
BetterWaystones BetterWaystones - Build, discover and travel between waystones - own 3D model, no resource pack