Menus
Every menu file, the keys every button takes, every click action, and the special sections of each menu.
Every menu is a YAML file in plugins/SeasonForge/menus/. Titles, sizes, sounds, every button, its slot, look and what it does on click are all in the file. After editing, run /battlepass admin reload. Open menus reopen with the change.
| File | Opened by | What it shows |
|---|---|---|
main.yml | /battlepass | Player summary, Claim All and buttons to the other menus |
quests.yml | /battlepass quests | The season's quests with filters and pages |
pass.yml | /battlepass pass | The reward track: levels, free and premium rewards |
shop.yml | /battlepass shop | The season's shop items |
premium.yml | /battlepass premium | What premium unlocks and how to buy it |
confirm.yml | Shop and premium purchases | A yes or no menu with the item being bought |
no-season.yml | /battlepass when no season runs and seasons.no-season-mode: MENU | A "no season running" notice |
Any other file you add, like menus/rules.yml, becomes a plain menu that a button can open with [open] rules.
Every menu
menus-version: 1
title: "<#b5832a><bold>Battle Pass</bold> <#6b5a3a>» <#8a6420>%season_name%"
rows: 5
open-sound: open-main
items:
quests:
slot: 29
material: WRITABLE_BOOK
name: "<#f2b544><bold>Quests"
lore:
- "<#c9c9c9>Complete quests to earn Battle Pass XP."
click-sound: quests-click
actions:
- "[open] quests"
decorations: {}| Key | What it does | Default |
|---|---|---|
title | Menu title. MiniMessage and placeholders work. | the file name |
rows | 1 to 6 | 6 |
open-sound | Sound key from sounds.yml played on open | open-<file name> |
items | Buttons, each runs its actions when clicked | |
decorations | Purely visual items. Empty in the bundled files, add your own if you want filler. |
Every button
These keys work for items, decorations and every special button below.
| Key | What it does |
|---|---|
slot | One slot number (0 is top left) |
slots | A list of slots, slots: [10, 11, 12], the same button in each |
material | Vanilla item |
itemsadder | ItemsAdder id (namespace:id). Replaces material when ItemsAdder has it. If not, material is shown and the console warns once. |
amount | Stack size |
name | Item name, MiniMessage and placeholders |
lore | Lore lines, MiniMessage and placeholders |
glow | Enchantment glow |
custom-model-data | Custom model data number for resource packs |
enchantments | Real enchantments, sharpness: 5 |
hide-flags | Hide attribute lines, on by default |
skull-owner | Whose head a PLAYER_HEAD shows. %player% is the viewer. |
click-sound | Sound key from sounds.yml, played on click. Default click. |
actions | What a click does, in order, see below |
Names and lore take MiniMessage, the old & colour codes, SeasonForge's own placeholders like %level%, and any PlaceholderAPI placeholder.
Actions
| Action | What it does |
|---|---|
[open] <menu> | Opens another menu by file name ([open] quests). Remembers where the player came from for [back]. |
[back] | Goes back to the menu the player came from, or closes if there is none |
[close] | Closes the menu |
[claim-all] | Claims every reward waiting, like /battlepass claimall |
[page-next] | Next page, in menus that have pages |
[page-previous] | Previous page |
[player] <command> | Runs a command as the player, without the slash |
[console] <command> | Runs a command from the console. %player% is the viewer. |
[message] <text> | Sends a MiniMessage line to the player. %prefix% works. |
[sound] <key> | Plays a sound key from sounds.yml |
[open] and [back] end the list: anything after them does not run. An unknown action is named in the console.
store:
slot: 33
material: EMERALD
name: "<#f2b544><bold>Buy on the store"
actions:
- "[message] %prefix%<white>Get premium on our store: <#f2b544><click:open_url:'https://store.yourserver.net'>store.yourserver.net</click>"
- "[close]"main.yml
Besides items, the main menu has two special buttons.
| Section | What it is |
|---|---|
summary | The player summary (a player head by default) with level, XP, progress bar, premium status, rewards waiting and season time left |
claim-all | The Claim All button. It has a slot, a click-sound, and two looks: available while rewards are waiting and empty while nothing is |
quests.yml
| Section | What it does |
|---|---|
default-filter | Filter selected when the menu opens: all, daily, weekly, monthly or seasonal |
quest-slots | Slots quests fill, in order. More quests than slots spill onto more pages. |
filters.<name> | One button per filter, with a slot, an item look and a selected look. %reset_in% shows that filter's countdown. Remove a filter to hide it. |
states.in-progress | Look of a quest still running |
states.completed | Look of a quest done this period |
states.locked | Look of a premium only quest for a player without premium |
empty | Shown when the filter has no quests |
navigation.previous / next | Page arrows, only shown when there is a page to go to |
Each state takes use-quest-icon: true to keep the quest's own icon from quests.yml and only swap the name and lore, or false to use the state's own material.
Placeholders in quest looks: %quest_name%, %description%, %progress%, %required%, %percentage%, %progress_bar%, %xp%, %reset% (the reset name, "Daily" and so on), %reset_in%, %quest_id%.
pass.yml
| Section | What it does |
|---|---|
level-slots | Slots for the level indicators, one level per slot |
free-slots | Slots for the free reward of each of those levels |
premium-slots | Slots for the premium reward of each of those levels |
level-item.reached / next / locked | Looks of a level indicator: reached, the next one to reach, and further away |
reward-states.claimable / claimed / locked-level / locked-premium / none | Looks of a reward slot. none is a level with nothing on that track, AIR by default. |
navigation.previous / next | Page arrows |
- The longest of the three slot lists sets how many levels fit on a page.
- Page arrows, like every button, take
slotor aslotslist.slots: [45, 46, 47]puts the same arrow in all three slots and each one works. navigation.previous.close-on-first-page: truekeeps the Previous arrow on the first page and makes it close the menu there, so the menu needs no separate Close button. On later pages it goes back a page as usual. Afirst-page:block insidepreviousgives it its own look on the first page.itemsadder: namespace:idonlevel-item.locked,reward-states.locked-levelandreward-states.locked-premiumshows that ItemsAdder icon while the level or reward is locked. Once unlocked the normal icon comes back. Empty keeps the normal icon.- The menu opens on the page with the first reward waiting to be claimed, or on the player's current level when nothing is waiting.
use-level-icon: trueuses the level'siconfromlevels.yml.level-as-amount: trueshows the level number as the stack size.use-reward-display: trueuses the reward's owndisplayitem fromlevels.ymland only swaps name and lore.- To style one track differently, add a
free:orpremium:block insidereward-stateswith its own states. The track's own state wins over the shared one. - Clicking a claimable reward claims it. A locked one tells the player why and plays
error(or the state'sclick-sound).
Placeholders in level and reward looks: %level_number%, %level_xp% (XP that level needs), %reward_name%, %reward_lore%, %track% ("Free" or "Premium").
shop.yml
The shop menu shows the running season's shop.yml items. See Shop and currencies for the items themselves.
| Section | What it does |
|---|---|
item-slots | Slots for shop items that do not set their own slot |
item-lore.lines | Lines added under every item's own lore (price, balance) |
item-lore.limit-lines | Added when the item has a purchase limit |
item-lore.buy-lines | Added while it can still be bought |
item-lore.maxed-lines | Added once the limit is reached |
empty | Shown when the season has no shop items |
navigation.previous / next | Page arrows |
Placeholders in shop item lines: %price%, %balance%, %currency%, %purchases%, %limit%, %remaining%, %limit_reset%, %item_name%.
premium.yml
| Section | What it does |
|---|---|
purchase-options.<name> | One button per way to buy premium in game. Each has slot, a look, currency (an id from currencies.yml), price and confirm (go through the confirm menu, default true). %price% and %balance% work in its lore. |
owned | Shown instead of the purchase options once the player owns premium |
Purchase options are hidden when premium.sources.purchase is false in config.yml. The bundled store button in items is an example of a link to your web store. See Premium.
confirm.yml
| Section | What it does |
|---|---|
display-slot | Slot showing the item being bought |
confirm | The confirm button (slots, look, click-sound) |
cancel | The cancel button. Goes back to the shop or premium menu. |
no-season.yml
A plain menu shown by /battlepass while no season runs, only when seasons.no-season-mode: MENU. It has only items and decorations.
Per season menus
A menu file in seasons/<folder>/menus/ replaces the global one of the same name while that season runs. See Seasons.
Placeholders in every menu
Every menu can use the player values: %player%, %level%, %max_level%, %next_level%, %xp%, %xp_required%, %xp_remaining%, %total_xp%, %progress_percentage%, %progress_bar%, %is_max_level%, %premium%, %premium_status%, %unclaimed_rewards%, %unclaimed_free%, %unclaimed_premium%, %claimed_free%, %claimed_premium%, %season%, %season_name%, %season_time_left%, %daily_reset_in%, %weekly_reset_in%, %monthly_reset_in%, %balance_<currency>%, and %page% and %pages% in menus with pages. These are written without the battlepass_ part inside menus. In other plugins use the PlaceholderAPI versions.
Clicks
Every click in a SeasonForge menu is cancelled, so items can never be taken out. Clicks closer together than 150 milliseconds are ignored, which stops auto clickers and double clicks from running a button twice.