Configuration reference
This is the config.yml AfkGuard writes on first start, comments included. Every key you see here is the key the plugin reads; there are no hidden ones. Change a value, reload, and it applies.
Top-level sections: language, afk, reasons, rewards, auto-kick.
# ============================================================
# AfkGuard v1.0.0 · Configuration
# ------------------------------------------------------------
# Part of the TTS-Studio plugin suite.
# Hot-reload with /afk reload after any change.
# ============================================================
# Active language. ISO-639-1 two-letter code (lowercase).
# Bundled out of the box: es (Spanish), en (English).
# Missing keys fall back to en automatically. Operators can drop extra
# lang/<code>.yml files in plugins/AfkGuard/lang/.
language: en
afk:
# Seconds of inactivity before a player is auto-marked AFK.
default-timeout-seconds: 300
# Per-permission overrides (granted permission = longer leash).
# Highest matched value wins.
per-permission-timeouts:
"afkguard.timeout.vip": 600
"afkguard.timeout.premium": 1200
# Worlds where nobody is auto-marked AFK (lobby, minigame or event worlds).
# Players can still use /afk by hand. Example: [lobby, spawn]
disabled-worlds: []
# Tell the player this many seconds before the timeout that they are about to
# be marked AFK (any movement or chat cancels it). 0 turns it off.
warn-before-seconds: 0
detection:
# Require an actual block change before resetting the AFK timer —
# tiny mouse jitter or sub-block packets won't count as activity.
require-block-change: true
# Minimum yaw/pitch delta (degrees) to count as a rotation.
require-rotation-degrees: 5.0
# Anti-macro: detect repeating movement loops (piston AFK pools etc.)
cyclic-pattern-detection: true
history-size: 20
max-cycle-length: 10
# Seconds the same loop must keep going before the player is marked AFK.
# Jumping in place or pacing between two blocks is short; a macro pool is not.
cyclic-min-seconds: 120
visual:
# Line floating above an AFK player's name (MiniMessage). Works alongside
# scoreboard, TAB and nametag plugins: it doesn't use a scoreboard team.
name-tag: "<gray>[AFK]"
show-name-tag: true
zone:
# When enabled, AFK players are teleported to a safe spot,
# fed, and made invulnerable until they return.
enabled: false
location:
world: "world"
x: 0.0
y: 80.0
z: 0.0
yaw: 0.0
pitch: 0.0
# Seconds after hitting or being hit by another player during which the
# zone does not take the player away (and /afk is refused). 0 turns it off.
combat-block-seconds: 15
teleport-back-on-activity: true
auto-feed: true
invulnerable: true
mob-cap-exclusion:
# Cancel natural mob spawns near AFK-only players so the cap
# doesn't fill up with mobs that nobody is fighting.
enabled: true
# ============================================================
# AFK STATUS REASONS (v1.1.0)
# ------------------------------------------------------------
# Lets players announce why they are going AFK.
# Example: /afk dinner -> "Steve is now AFK (dinner)"
#
# - reasons.enabled = false -> /afk ignores any reason argument.
# - reasons.free-text = true -> any word is accepted
# (can invite spam or inappropriate text — off by default).
# ============================================================
reasons:
enabled: true
free-text: false
allowed:
- dinner
- gaming
- brb
- working
- sleeping
# ============================================================
# AFK REWARDS (v1.6.0)
# ------------------------------------------------------------
# Pay players who stay AFK: useful for an AFK zone or an AFK room.
# The clock starts when they go AFK and moving starts it again, so
# a reward always means a full interval without playing.
#
# - enabled: false -> nothing is paid (default, non-breaking).
# - interval-minutes: AFK time between rewards.
# - daily-limit: rewards per player per day, 0 for no limit. It is
# saved, so leaving and coming back does not reset it. The day
# changes at midnight, server time.
# - require-zone: pay only players the AFK zone took away (afk.zone).
# - worlds: pay only in these worlds. Empty = every world.
# - commands: run from the console. {player}, {uuid} and {count}
# (rewards paid today, this one included) are filled in.
# - tiers: the first one whose permission the player has replaces
# the values it sets; the rest stay as above.
# Operators hold every permission, so they get the first tier.
# For no tiers write "tiers: []": deleting the key keeps the default.
# If auto-kick is on, keep its threshold above interval-minutes or
# players are kicked before they earn anything.
# Permission: afkguard.rewards (default true). /afk rewards shows
# how many were paid today and when the next one comes.
# ============================================================
rewards:
enabled: false
interval-minutes: 10
daily-limit: 12
require-zone: false
worlds: []
commands:
- "eco give {player} 50"
tiers:
- permission: "afkguard.rewards.vip"
interval-minutes: 5
daily-limit: 24
# ============================================================
# AUTO-KICK (v1.2.0)
# ------------------------------------------------------------
# Kick players who stay AFK too long. Warnings are sent at
# configurable intervals before the kick.
#
# - enabled: false → feature is completely off (default, non-breaking).
# - threshold-seconds: how long a player must be AFK before kick.
# - warn-at: seconds before kick at which to send a warning message.
# Example: [60, 30, 10] sends warnings at 9m, 9m30s, 9m50s for a
# 10-minute threshold.
# - per-permission-thresholds: override threshold for specific groups.
# Use -1 to prevent a group from ever being kicked.
# Bypass permission: afkguard.bypass.kick (default false).
# ============================================================
auto-kick:
enabled: false
threshold-seconds: 600
warn-at:
- 60
- 30
- 10
# Each entry overrides the threshold for players with that permission.
# The highest matching threshold wins (most generous). Use -1 to exempt a group entirely.
per-permission-thresholds:
"afkguard.kick.vip": 1200
"afkguard.kick.premium": -1