AFK zone
Requires WorldGuard
Payouts through the “Cobaltia” plugin
config.yml
Examples with coins_par_seconde: 1 and star_coins_par_seconde: 2
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.
Configuration
Section titled “Configuration”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- 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.
- Every second: the gain is accumulated, and the banner shows
+N coins/s | today X/cap. - Payout: every
versement_secondes, accumulated coins are credited through thecobaltia eco give <player> coins <amount>command of the “Cobaltia” plugin. - Cap: once the daily cap is reached, gains stop, the player is warned once and the banner shows “Daily AFK cap reached”.
- 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.
Gain per second
Section titled “Gain per second”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.
Player without permission → 1 coin/scobaltia.afk.multiplier.15 → 1.5 coins/scobaltia.afk.star → 2 coins/scobaltia.afk.star + afk.multiplier.30 → 3 coins/s