Skip to content

AFK zone

Requires WorldGuard Payouts through the “Cobaltia” plugin

A player standing in an AFK WorldGuard region earns coins every second, up to a daily cap. The counter is shown continuously in the banner.

config.yml
zone_afk:
actif: true
regions: [afk] # WorldGuard region IDs (case-insensitive)
coins_par_seconde: 1 # base gain
star_coins_par_seconde: 2 # minimum gain for "star" players
plafond_jour: 5000 # max AFK coins per player per day (example value)
versement_secondes: 30 # how often gains are paid to the balance
  1. Enter: message “AFK zone — you earn N coin(s)/s, X more coins possible today”. If the cap is already reached, the player is told right away.
  2. Every second: the gain is accumulated, and the banner shows +N coins/s | today X/cap.
  3. Payout: every versement_secondes, accumulated coins are credited through the cobaltia eco give <player> coins <amount> command of the “Cobaltia” plugin.
  4. Cap: once the daily cap is reached, gains stop, the player is warned once and the banner shows “Daily AFK cap reached”.
  5. Leave: the remainder is paid immediately with a summary “N coins earned during the session”. A disconnect or a server stop also pays the remainder.

The cap resets every day at midnight, Paris time. The day’s gains are saved to afk.yml and survive restarts, which prevents bypassing the cap by reconnecting.

The player’s rate is computed when entering the zone:

Permission Effect on the rate
(none) coins_par_seconde
cobaltia.afk.multiplier.<tenths> Multiplies the base rate; the value is in tenths: 15 = ×1.5, 20 = ×2. The highest permission wins.
cobaltia.afk.star The rate is at least star_coins_par_seconde (the multiplier applies if it gives more)

Decimal rates are supported: a rate of 1.5 coins/s pays 3 coins every 2 seconds, with no rounding loss.

Examples with coins_par_seconde: 1 and star_coins_par_seconde: 2
Player without permission → 1 coin/s
cobaltia.afk.multiplier.15 → 1.5 coins/s
cobaltia.afk.star → 2 coins/s
cobaltia.afk.star + afk.multiplier.30 → 3 coins/s