Rewards
A reward tier is a point-gated entry in rewards.yml that a player can claim once their season points reach its required-points threshold. Every tier carries two independent claims — a free one and a premium one — each with its own action list and its own claimed/unclaimed state, so a premium player and a free player progress through the same tier list but receive different rewards (or none, if a side is left empty).
rewards.yml format
rewards.yml is loaded into a RewardsConfiguration — a map of reward id → RewardBlueprint (RewardBlueprintTypeSerializer). The map key itself becomes the blueprint's id; there is no separate id: field inside the entry.
Field | Type | Description |
|---|---|---|
| int | Point threshold ( |
|
| Optional. Actions run when a player claims the free side of this tier. |
|
| Optional. Actions run when a player claims the premium side of this tier. |
|
| Optional. Icon shown for the free side ( |
|
| Optional. Icon shown for the premium side ( |
If default/premium is omitted (or empty), that side has nothing to run on claim, but claiming it is still tracked — see Claim tracking below.
Example
RewardType and claim tracking
RewardType is a two-value enum, FREE and PREMIUM (RewardType.parse accepts either case, throwing on anything else). A reward tier's free and premium sides are claimed independently and tracked in FarmPassData.claimedRewards() — a Set<String> of keys built as "<reward-id>_<free|premium>" (e.g. welcome_bonus_free, welcome_bonus_premium). Claiming one side never marks the other as claimed.
claim-farmpass-reward
Registered via registerAction("claim-farmpass-reward", ClaimRewardAction.class). Claims one side of a reward tier for the executing player.
Arg | Type | Description |
|---|---|---|
| String placeholder (single token) | Required. The reward tier's id — the map key under |
| String placeholder | Required. |
Execution:
Resolves the reward blueprint via
plugin.rewards().findById(id). Throws if no such tier exists.Looks up the executing player's
FarmPassDataviaSyncAPI.findData. Throws if no synced data exists.Builds the claim key
"<id>_<type>"and checks it againstFarmPassData.claimedRewards(). If already present, sends thereward-already-claimedmessage (FarmPassMessages.REWARD_ALREADY_CLAIMED, default text: "You have already claimed your reward for this quest.") and stops — nothing further runs.Otherwise, adds the claim key to
claimedRewards()before running any actions.Runs the tier's
defaultaction list forfree, or itspremiumaction list forpremium. If that side has no action list configured (null), the claim is still recorded but nothing executes.
Availability logic
RewardBlueprint is itself a ComplexPlaceholder (namespace reward) exposing claimed/available sub-keys that require a next token (free/premium) and a Player context:
claimed—trueifFarmPassData.claimedRewards()contains"<id>_<type>"for the requested type;falseif the player has no syncedFarmPassDatayet.available—trueonly when the requested type is not yet claimed and the player'spoints()are>= requiredPoints. Unlikeclaimed, this throwsIllegalStateExceptionif the player has no syncedFarmPassData, rather than defaulting tofalse.
These surface as %reward_claimed_free%, %reward_claimed_premium%, %reward_available_free%, and %reward_available_premium% — see Placeholders for the full reward_* reference, including %reward_display%/%reward_premiumDisplay%/%reward_hasDefault%/%reward_hasPremium%.
Menu integration
%farmpass_rewards% exposes every loaded RewardBlueprint as an ItemProvider, meant to back a menu layout's provider: the same way %farmpass_quests% backs the quest grid in farmpass-main (see Configuration for that layout). Iterating it renders one item per tier; inside that item's template, %reward_claimed_free%/%reward_available_free% (or the _premium variants) pick which icon, lore, or action to show, and a claim button fires claim-farmpass-reward with that tier's id and the relevant type. See Placeholders ("Usage: the main menu") for the exact %parameter_reward_...% chaining mechanics.
Earning and adjusting points
Points are earned automatically by completing quests: QuestService.tryProgress credits the completed quest's category rewarded-points (daily: 10, weekly: 50 by default) to FarmPassData.points() — see Seasons & Categories → Categories. Staff can also adjust a player's balance directly with /farmpass points add|take|set, independent of quest completion.
Further reading
Overview — how rewards fit alongside seasons, quests, and points.
Seasons & Categories —
rewarded-pointsper category.Commands —
/farmpass points add|take|set.Placeholders — full
reward_*placeholder reference.Developer API —
FarmPassData.claimedRewards()and using the action from other plugins.