Rewards
rewards.yml is the pass's ladder: an ordered list of tiers, each gated behind a points threshold, each with a free and a premium track that are claimed separately. Players spend nothing — points are a threshold, not a currency: claiming a tier does not lower the total, so reaching 45 000 points unlocks every tier below it.
rewards.yml format
Field | Type | Required | Description |
|---|---|---|---|
| String | Yes | Tier identifier. It is what |
| int | Yes | Points the player must have reached to claim either track. |
|
| No | The free track's icon. |
|
| No | The premium track's icon. |
|
| No | What the free track hands out. |
|
| No | What the premium track hands out. |
The list order is the order the menu lays the tiers out — RewardsConfiguration keeps it as written and only ever looks a tier up by id.
A tier may have no default-actions at all, in which case only the premium track gives something; the menu draws an empty slot on the free row for those (%reward_hasDefault% is what it checks).
Tracks and claim tracking
RewardType has two values, FREE and PREMIUM. Each track of each tier is claimed independently and recorded in FarmPassPlayerData.claimedRewards() as "<id>_<free|premium>" — so reward_2_free and reward_2_premium are two separate claims.
The premium track is gated by the premium-permission from config.yml (farmpass.premium by default). Leaving that key empty opens the premium track to everyone.
Claims are wiped with everything else at the season rollover.
claim-farmpass-reward
Claims one track of one tier for the executing player.
Arg | Type | Description |
|---|---|---|
| String | Tier id, one token. Placeholder-aware — the menu passes |
| String |
|
The action is registered on the plugin's own registry (registerAction), so it resolves in AstralFarmPass's own configuration — its menus and rewards.yml — and not in other plugins' configs.
Claim flow
In order:
The type and id are parsed and the tier looked up; an unknown id or type throws.
The player's
FarmPassPlayerDatais resolved. If their snapshot is not loaded, the action silently does nothing.Already claimed on that track →
reward-already-claimed, stop.Points below
required-points→reward-not-unlocked, carrying%points%= how many are missing, stop.Premium track without
premium-permission→reward-premium-only, stop. The menu already hides the premium row from players without it, but an action is reachable from wherever it is configured, so it checks rather than trusting the icon.The claim is recorded, then the track's action list runs.
Recording before running is deliberate: a double click must not hand the reward out twice, and a tier with nothing on this track still counts as claimed so the menu can tick it off. It also means a failing action list does not un-claim the tier.
Points are never deducted.
Placeholders
Under the reward namespace, as fed to the menu by %farmpass_rewards%:
Placeholder | Resolves to |
|---|---|
| The tier id. |
| Its threshold. |
| The two icons (null when the tier omits one). |
| Whether that track has a non-empty action list. |
| Whether the viewer already claimed that track. |
| Whether the viewer can claim it now — not claimed and enough points. Note this does not test the premium permission. |
See Placeholders for the full namespace.
Menu integration
The shipped farmpass-main menu drives three layouts (rewards_free, rewards_all, rewards_premium) off the same %farmpass_rewards% provider, so the three rows stay aligned page by page: the free track on row 1, the claim row on row 2, the premium track on row 4. Each row picks its icon with view-requirements on %parameter_reward_claimed_…%/%parameter_reward_available_…%, and the claim row runs the action then refreshes all three layouts:
Running both claims from one click is safe: whichever one is not applicable stops on its own check.
Earning and adjusting points
Points come from completing quests — the reward of the quest's category — and can be adjusted by staff with /pass points. They never go below 0, and %farmpass_points% exposes the current total.
Further reading
Configuration —
premium-permission.Commands — adjusting points.
Seasons & Generation — when claims are wiped.