Overview
AstralFarmPass is a seasonal battle-pass / quest plugin for AstralRealms. Each month a new season opens with a fresh set of randomly generated daily and weekly quests; players complete them through normal gameplay to earn points, and spend those points unlocking free and premium reward tiers from an in-game menu.
Core concepts
Concept | Summary |
|---|---|
Season | A one-month period ( |
Quest blueprint | A template defined in |
Quest instance | A concrete quest rolled from a blueprint for a given season: a random target within the blueprint's range, an |
Category |
|
Points | Per-player, per-season currency ( |
Reward tier | An entry in |
Architecture at a glance
How the pieces fit together
quests/*.yml(loaded as a whole folder byBlueprintService) ships the quest blueprints, andcategories.yml(CategoriesConfiguration) defines thedaily/weeklycategories those blueprints roll into — together they're the raw material for quest generation. See Quests & Goals and Seasons & Categories.The master node (
config.yml→master: true) runsSeasonRotationService, which polls every 5 minutes, creates a newSeasonEntityfor the current month when none is active or the current one has expired, and populates it by callingQuestGenerationService.generateRandomQuest(...)once per day for each daily slot and once per week for each weekly slot — picking a random unused blueprint per category and rolling a random target inside itsmin/maxrange. See Seasons & Categories.As players play,
GoalListener(plusArrowPiercingListener, which synthesizes a customArrowKillMultipleEntitiesEventfor multi-kill piercing-arrow shots) routes Bukkit/Astral events intoQuestService#tryProgress, which advances any matching, unlocked, unexpired quest instance and, on completion, credits the quest's categoryrewarded-pointsto the player'sFarmPassData. See Quests & Goals.rewards.yml(RewardsConfiguration) defines the point-gated reward tiers; players claim them through the/passmenu, which fires theclaim-farmpass-rewardaction. See Rewards.
Requirements
Dependency | Required | Notes |
|---|---|---|
Paper 1.21+ | Yes |
|
AstralCore | Yes | Plugin bootstrap ( |
AstralVote | Yes | Fires |
AstralScrolls | Yes | Fires |
AstralTower-Bridge | Yes | Fires |
AstralSync | Runtime | Not declared in |
MariaDB | Yes |
|
Redis | Yes |
|
RabbitMQ | Yes |
|
Registered surfaces
Everything the plugin registers in AstralFarmPass#onEnable:
Surface | Name | Notes |
|---|---|---|
Action | Claims a free or premium reward tier for the executing player. | |
Command |
| Opens the main menu; |
Command |
|
|
Placeholder namespace |
|
|
SyncAPI adapter |
|
|
Listener |
| Routes 19 Bukkit/Astral events into quest-goal progress (plus a quit-cleanup handler). |
Listener |
| Tracks piercing-arrow multi-kills and raises |
See Commands, Placeholders, and Developer API for the full detail on each surface.
claim-farmpass-reward
Registered via registerAction("claim-farmpass-reward", ClaimRewardAction.class). Looks up a RewardBlueprint by id, resolves its default (free) or premium action list based on the type argument, and runs it once per player/reward/type combination (tracked in FarmPassData.claimedRewards() as "<id>_<type>"). See Rewards for the full argument reference.
Cross-server model
Exactly one node per network is configured as the master (config.yml → master: boolean). Only the master's SeasonRotationService is allowed to create or rotate seasons — non-master nodes that find no active season, or find the current season expired, log that they're waiting and clear their cached season instead of creating one. When the master creates or rotates a season it broadcasts a FarmpassUpdatedPacket (channel farmpass, packet id 0x00) over MessagingService; every node (including the master) has SeasonService listening on that exchange, and non-master nodes reload the current season from the database when the packet arrives. Player quest progress and points travel independently of this packet, via AstralSync's own cross-server replication of FarmPassData.
Further reading
Configuration —
config.ymlmasterflag andmessages.yml.Commands — full
/passand/farmpass pointsreference.Quests & Goals — blueprint format and every
QuestGoaltype.Seasons & Categories — season lifecycle and
categories.yml.Rewards —
rewards.ymlformat and the claim flow.Placeholders —
%farmpass_...%reference.Developer API — services, repositories, and events for other plugins to hook into.