Skip to content

Rewards

Tebrox edited this page Sep 20, 2026 · 1 revision

Rewards

Each AFK area can have its own weighted command reward pool and reward schedule.

Rewards are executed by the server console while the player remains in the AFK area.

Reward structure

A reward contains:

  • Reward ID
  • Enabled state
  • Weight
  • Optional permission
  • One or more console commands
  • Optional message

Creating a reward

/afkarea reward add spawn-afk diamond

New rewards remain disabled until they have been configured with commands.

Add a command:

/afkarea reward command add spawn-afk diamond give <player> diamond 1

Enable it:

/afkarea reward enable spawn-afk diamond true

A reward cannot be enabled without at least one command.

Command placeholders

Placeholder Value
<player> Player name
<uuid> Player UUID
<area> Technical area ID
<area_name> Display name
<reward> Reward ID

A leading / in a stored command is accepted and removed before dispatch.

Weights

/afkarea reward weight spawn-afk diamond 10

Weights are relative rather than independent percentages.

Example:

common  70
rare    20
epic    10

Disabled rewards, invalid weights and rewards whose permission requirement is not met are excluded before selection.

Reward permissions

Set:

/afkarea reward permission spawn-afk vip afkarea.reward.vip

Clear:

/afkarea reward permission spawn-afk vip none

Reward messages

Message precedence:

  1. Reward-specific message
  2. Area-level default reward message
  3. Global reward message from messages.yml

Reward-specific:

/afkarea reward message spawn-afk diamond <green>You received a diamond!</green>

Area default:

/afkarea reward defaultmessage spawn-afk <green>You received <reward>!</green>

Use none to clear either override.

Interval schedules

/afkarea reward interval spawn-afk 300 1

This means one roll every 300 seconds.

Running the interval command switches the area to interval scheduling.

Milestone schedules

/afkarea reward milestone add spawn-afk 300 1
/afkarea reward milestone add spawn-afk 900 2
/afkarea reward milestone add spawn-afk 1800 3

Example result:

5 minutes  -> 1 roll
15 minutes -> 2 rolls
30 minutes -> 3 rolls

Adding a milestone switches the area to milestone scheduling.

List:

/afkarea reward milestone list spawn-afk

Remove:

/afkarea reward milestone remove spawn-afk 900

The final milestone cannot be removed while the milestone schedule is active.

Multiple rolls and duplicates

/afkarea reward duplicates spawn-afk true
/afkarea reward duplicates spawn-afk false

With duplicates disabled, the same reward cannot be selected twice within one multi-roll grant.

Inspecting configuration

/afkarea reward info spawn-afk
/afkarea reward list spawn-afk

Session behavior

Reward progress begins on AFK area entry.

Leaving or disconnecting ends the reward session. Rewards do not continue while the player is offline.

Changing the schedule resets reward-schedule progress for current sessions in that area, but preserves overall AFK area session time.

Reward bypass

afkarea.bypass.rewards

Players with this permission do not receive AFK area rewards.

IP limit

Rewards can also be restricted by the per-IP limit.

See Anti-Abuse & Households.

Related pages

Clone this wiki locally