AFK Control icon

AFK Control -----

Lightweight AFK detector with warnings and kicks.



[​IMG]

Overview
• Detects inactive players and warns/kicks based on configurable thresholds
• Optional AFK Pool region where players are exempt from kicks (with capacity limit)
• Fully configurable messages, kick screen, and admin GUI panel
• Supports 1.8.x → 1.21.x. No dependencies


Features
  • Inactivity thresholds with separate warn and kick timers.
  • Admin-selectable AFK Pool region (left-click = pos1, right-click = pos2), with timeout.
  • Capacity limit for number of exempt players in pool.
  • Optional admin bossbar pulse when pool is toggled.
  • Read-only in-game panel showing live config values.
  • Kick screen and formatting in messages.
  • Console logs
  • Update checker: notifies admins in-game when a new build release is posted.

Planned Features
  • Smart Activity Detection – Tracks movement, chat, and commands for accurate AFK detection.
  • AFK Pool Enhancements – Hologram boundaries, /afkcontrol pool info, and optional auto-teleport.
  • Dynamic Kick Screen – Custom kick messages with gradients and hover text.
  • AFK Reminders – Periodic title/action bar warnings with optional sound alerts.
  • Player Overview Tab – GUI tab showing all players with AFK/Active indicators.


Commands
Code (Text):

/afkcontrol              # Show help (also works with aliases: /afk, /afkc, /ac, /acontrol)
/afkcontrol reload       # Reload config.yml and messages.yml
/afkcontrol select       # Get wand to select AFK Pool (pos1 = left click, pos2 = right click)
/afkcontrol reset        # Clear current AFK Pool region (restores normal kick logic)
/afkcontrol panel        # Open in-game read-only overview panel
/afkcontrol kick <player> <reason>        # Open a confirmation flow to kick a player with a reason
 

Permissions
  • afkcontrol.use – Base permission for the command (default: true)
  • afkcontrol.admin – Access to admin subcommands and panel (default: op)
  • afkcontrol.panel – Open the Control Panel (also granted by afkcontrol.admin)
  • afkcontrol.kick – Use /afkcontrol kick (also under afkcontrol.admin)
  • afkcontrol.exempt – Player is exempt from AFK checks (default: false)


Quick Start
  1. Drop the jar in /plugins and start your server once.
  2. Edit config.yml and messages.yml to your liking.
  3. (Optional) Define an AFK Pool region: /afkcontrol select then left-click pos1 and right-click pos2.
  4. Reload: /afkcontrol reload or restart the server.


config.yml (key options)
Code (YAML):

enabled
: true

# Inactivity thresholds (seconds)
afkThresholdSeconds
: 120   # Mark player as AFK after this many seconds
warnAtSeconds
: 90           # Warn before kick (0 = disabled)
kickAtSeconds
: 150         # Kick after this many seconds (0 = disabled)

# Scan frequency (ticks); 20 ticks = 1 second
scanIntervalTicks
: 20

# AFK Pool region and behavior
pool
:
  enabled
: true
  capacity
: 10                   # Max exempt players inside pool
  wandMaterial
: GOLD_AXE         # Wand material given on /select (auto-fallbacks)
  selectTimeoutSeconds
: 60       # Timeout for region selection
  region
:
    pos1
: ""                     # Stored as "world:x:y:z"
    pos2
: ""

# Admin bossbar pulse when pool is toggled (best-effort on older versions)
adminBossbarWhenToggled
: true

# Update checker (SpigotMC via Spiget)
updates
:
  enabled
: true
  spigotResourceId
: 123456       # <-- set your real resource ID
  checkHours
: 12
  notifyPermission
: afkcontrol.admin
  downloadUrlOverride
: ""
  lastNotified
: ""

# Fallback kick reason (use messages.yml kickScreen for multi-line)
kickReason
: "Kicked for being AFK too long."

# Actions on warn/kick
actions
:
  titleOnWarn
: true
  actionbarOnWarn
: true
  soundOnWarn
: true
 


messages.yml (highlights)
Code (YAML):

# Supports MiniMessage-like tags and &-codes. Multi-line arrays allowed.
prefix
: "<gold><bold>[AFK Control]</bold></gold> <gray>»</gray> "

# Generic
noPerm
: "<red>You lack permission.</red>"
onlyPlayers
: "<red>Players only.</red>"
unknownSub
:
 - "<red>Unknown subcommand.</red>"
  - "<gray>Usage:</gray> <white>/afkcontrol reload|select|reset|panel</white>"

# Lifecycle
nowAfk
: "<yellow>You are now marked as AFK.</yellow>"
back
: "<green>Welcome back! You are no longer AFK.</green>"
warn
: "<gold>You have been inactive. You will be kicked soon.</gold>"

# Selection flow
selectStart
:
 - "<yellow>Selection started.</yellow>"
  - "Left-click = <aqua>pos1</aqua>; Right-click = <aqua>pos2</aqua>."
selectTimeout
: "<red>Selection timed out after {seconds}s.</red>"
selectAlready
: "<red>You already have an active selection.</red>"
selectGaveWand
: "<gray>Gave you the AFK pool wand: <white>{material}</white></gray>"
selectTooSmall
: "<red>Region is too small. It cannot be 1x1x1.</red>"
selectSaved
:
 - "<green>AFK pool region saved.</green>"
  - "<gray>Size:</gray> <white>{size}</white> blocks."

# Reset
resetDone
:
 - "<yellow>AFK pool region cleared.</yellow>"
  - "<gray>Auto-kick rules restored.</gray>"

# Panel
panelOpen
: "<yellow>Opening AFK Control panel…</yellow>"

# Multi-line kick screen (shown on kick)
kickScreen
:
 - "<red><bold>AFK Timeout</bold></red>"
  - "<gray>You were inactive for too long.</gray>"
  - "<gray>Rejoin any time!</gray>"

# Updater
updateAvailable
: "<yellow>A new version is available: <white>{latest}</white> <gray>(you have {current})</gray></yellow>"
updateLinkLabel
: "Click here to open the SpigotMC download page."
 


Compatibility
• Servers: Spigot/Paper 1.8.x → 1.21.x
• Java: Java 8 (for broad compatibility)


Support & Feedback
If you find an issue or want a feature, please open a discussion or review with details (server version, steps, console output) ❤ Sergeant Fuzzy
Resource Information
Author:
----------
Total Downloads: 10
First Release: Oct 6, 2025
Last Update: Oct 8, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings