Configuration
AstralRanks' configuration is split across <plugin-data-folder>/config.yml, categories.yml, messages.yml, a ranks/ folder holding one file per rank, and a menus/ folder holding the three menu blueprints the plugin renders through AstralCore's MenuContainer. All of it — the top-level files, every rank file, and every menu blueprint — is reloaded in one pass by /ranks reload.
File layout
ranks/is created on first start if it doesn't exist yet, and seeded with a singledefault.ymlcopied from the plugin jar (configurationManager().copyResource(...), resourceranks/default.yml). Every other.yml/.yamlfile placed in the folder afterwards is picked up automatically on load — the file name is irrelevant, each file's ownidfield determines the rank's identity. See Ranks & Progression for the fullRankConfigurationshape.menus/holds the three fixed menu blueprints AstralRanks opens by id —ranks.yml,categories.yml,requirements.yml. See Menus below.
config.yml
Field | Type | Description |
|---|---|---|
| String | The id of the starting rank every player begins on. |
|
| Rank ids whose unlock does not trigger the network-wide |
This is the shipped default: the starting rank (ranks/default.yml, id: "default") is both the default-group and listed in ignore-broadcast, so reaching it — which every player already has — never spams a network broadcast.
categories.yml
A single categories map, keyed by category id, deserialised through CategoryConfiguration (Map<String, RequirementCategory>). Each entry is resolved by CategoryTypeSerializer:
the map key becomes the category's
id(read fromnode.key()), not a separateid:field;the rest of the entry is read directly as an
ItemStackWrapper(material,name,lore,item-flags, …) — this is the icon shown for the category in therank-detailsmenu;a
rewardsnode holds the rewards to grant on completion, seerewardsbelow.
Categories are referenced from rank files by id — each requirements.<key>.category entry in a ranks/*.yml file must name one of these ids. See Requirements & Missions.
rewards
rewards is a Map<String, PaperActionList> keyed by rank id, not a plain action list. When a player finishes every requirement in a category for a given rank, RankService#updateRequirement() looks the reward list up by that rank's id — category.rewards().get(rank.id()) — and runs it:
Here default is the id of the rank (ranks/default.yml) the reward applies to; completing this category while on a different rank looks up that rank's own key instead, and runs nothing if the key is absent.
Menus
MenuService wraps an AstralCore MenuContainer rooted at <plugin-data-folder>/menus/. On load, the container walks that folder (configurationManager().loadFolder(...)) and registers every blueprint it finds under the id declared inside the file — not the filename. AstralRanks opens three fixed ids:
Menu id | File | Opened via |
|---|---|---|
|
|
|
|
| Clicking an unlocked rank in |
|
| Clicking a category in |
Rename or restructure these files freely as long as each still declares its matching id — the lookups above are by id, not path.
Reloading
/ranks reload (permission astralranks.reload) calls AstralRanks#loadConfiguration(), which reloads, in order:
config.yml→MainConfigurationcategories.yml→CategoryConfigurationmessages.yml→RanksMessages(loadEnum)every file under
ranks/(RankService#load())every blueprint under
menus/(MenuService#loadConfiguration()→MenuContainer#load())
See Commands for the full /ranks command reference.
Type serializers
Registered once in AstralRanks#onEnable(), before loadConfiguration() runs, so every YAML node described above (and the rank-file requirement blocks) maps straight onto these models:
Model | Serializer |
|---|---|
|
|
|
|
|
|
Both requirement serializers back the ranks/*.yml requirement blocks; see Requirements & Missions for their full shape.
See also
Ranks & Progression — the
ranks/*.ymlfile shape (RankConfiguration), rank ordering, and unlock rules.Requirements & Missions — the
requirementsblock inside a rank file and theRankRequirementtypes.Commands — the full
/ranksand/missioncommand reference.Messages —
messages.yml.