Skip to main content

AFK Module

Configuration Reference​

KeyTypeDefaultDescription
enabledbooleantrueEnable or disable the AFK module
block-commandsbooleantruePrevent execution of non-whitelisted commands while AFK
whitelisted-commandsstring[][helpop, msg, r, tell, whisper, w, afk, firebox:afk]Commands allowed during AFK
reset-afk-time-on-quitbooleantrueReset AFK timer when player quits (does not reset reward claims)
region-task-delay-ticksnumber60Frequency (in ticks) of region AFK checks
give-mode"TIMER" | "CHANCE"TIMERMode for awarding rewards
zone-mode"TP" | "REGION" | "BOTH"BOTHMode determining AFK zone behavior
chance-mode-timenumber2Interval (in seconds) for chance-based reward checks
show-afk-statusbooleanfalseShow AFK status in the action bar
show-afk-titlebooleanfalseShow AFK title on the player’s screen when AFK is active
afk-rewardsobject[][]List of reward configurations (name, permission, needed-time, actions)

Features​

  • Block configurable commands while AFK
  • Reset AFK timer on quit without affecting reward claims
  • Support for TIMER and CHANCE reward modes
  • Region-based AFK counting with configurable tick delay
  • Customizable AFK rewards with permissions and claim limits
  • Action bar and title notifications for AFK status

Mode Descriptions​

Give Mode​

  • TIMER: Grants rewards at fixed intervals. Each needed-time seconds the specified reward is awarded.
  • CHANCE: Every chance-mode-time seconds the plugin performs a random check; if the check succeeds, the reward is granted. This allows for probabilistic reward distribution over time based on needed-time as the weight.

Zone Mode​

  • TP: Only counts AFK time when the player is teleported to a designated AFK region (e.g., using a command).
  • REGION: Counts AFK time only when the player remains within configured region areas (requires proper WorldGuard regions).
  • BOTH: Enables both TP and REGION checks; AFK time is counted when either condition is met.

Example​

enabled: true
block-commands: true
whitelisted-commands:
- helpop
- msg
- r
- tell
- whisper
- w
- afk
- firebox:afk
reset-afk-time-on-quit: true
region-task-delay-ticks: 60
give-mode: TIMER
zone-mode: BOTH
chance-mode-time: 2
show-afk-status: false
show-afk-title: false
regions:
- world: world
mode: WHITELIST
regions:
- region1
- region2
afk-rewards:
- name: "&a&lDefault Reward"
permission: ""
needed-time: 60
max-claims: 5
actions:
- "chat: &aYou have been rewarded for being afk for 60 seconds!"
- "console: give %player_name% diamond 1"
- name: "&a&lVIP Reward"
permission: vip
needed-time: 120
max-claims: -1
actions:
- "chat: &aYou have been rewarded for being afk for 120 seconds and being vip!"
- "console: give %player_name% diamond 5"