Skip to content

Configuration

Tebrox edited this page Sep 20, 2026 · 1 revision

Configuration

AFK Area stores its main settings in:

plugins/AFKArea/config.yml

Player-facing messages and display text are stored in:

plugins/AFKArea/messages.yml

Default configuration

afk:
  mark-after-seconds: 300
  teleport-after-seconds: 1800
  auto-teleport:
    enabled: true
    target-area: spawn-afk

visibility:
  hide-from-players: true
  hide-from-tablist: true
  staff-view-permission: afkarea.staff.see-hidden

anti-abuse:
  max-rewarding-players-per-ip: 2

database:
  backend: json
  use-queue: true
  timeout-millis: 5000
  pool-size: 5
  table-prefix: afkarea_
  mysql:
    url: ""
    user: ""
    password: ""

display:
  bossbar:
    enabled: true
    color: yellow
    style: progress
  actionbar:
    enabled: true

AFK settings

afk.mark-after-seconds

Seconds of inactivity before a player becomes AFK automatically.

Default: 300 (5 minutes). Must be 0 or greater.

afk.teleport-after-seconds

Total idle time before automatic teleporting is attempted.

Default: 1800 (30 minutes).

This is the total idle duration, not an additional delay after the player becomes AFK.

The value must be greater than 0 and must not be lower than afk.mark-after-seconds.

afk.auto-teleport.enabled

Enables or disables automatic teleporting.

afk.auto-teleport.target-area

Technical area ID used by automatic teleporting and /afkarea.

The area must exist and have a valid teleport destination. When automatic teleporting is enabled, this value may not be blank.

See AFK Areas.

Visibility

visibility.hide-from-players

Hides players inside an AFK area from regular players in the game world.

visibility.hide-from-tablist

Hides players inside an AFK area from regular players in the player list.

visibility.staff-view-permission

Default:

afkarea.staff.see-hidden

Players with this permission can still see players hidden by AFK Area.

See Commands & Permissions.

Anti-abuse

anti-abuse.max-rewarding-players-per-ip

Default: 2.

Valid values:

-1  unlimited
1+  maximum rewarding identities per IP

0 is invalid.

The limit affects rewards only.

See Anti-Abuse & Households.

Database

Supported backends:

json
h2
mysql

JSON is the default.

MySQL/MariaDB example:

database:
  backend: mysql
  mysql:
    url: "jdbc:mysql://localhost:3306/minecraft"
    user: "minecraft"
    password: "your-password"

Additional settings:

database:
  use-queue: true
  timeout-millis: 5000
  pool-size: 5
  table-prefix: afkarea_

The table prefix may contain only letters, numbers and underscores.

Database settings are initialized at startup. Changing them with /afkarea reload does not reconnect the database; restart the server after changing database settings.

See Database & Storage.

Bossbar

Supported colors:

pink
blue
red
green
yellow
purple
white

Supported styles:

progress
notched-6
notched-10
notched-12
notched-20

See Bossbar & Actionbar.

Messages

messages.yml contains AFK messages, area messages, command responses, reward messages and display text.

Both MiniMessage and legacy & color codes are supported.

Reloading configuration

/afkarea reload

Permission:

afkarea.admin.reload

Most configuration and message changes are applied immediately. Database connection settings require a restart.

Validation

AFK Area validates config.yml on startup and reload.

Invalid values include:

  • Negative AFK timing values
  • Teleport timeout below AFK timeout
  • Empty target area while automatic teleporting is enabled
  • Unsupported database backend
  • Invalid database timeout/pool size
  • Invalid bossbar color/style
  • IP limit 0

If reload validation fails, the previous active configuration remains in use.

Related pages

Clone this wiki locally