Content generated with AI — it may contain mistakes.

ExyliaSurvivalCore/ReferenceUpdated in v1.2.2

Edit the menus

The sixty-two screens, which folder keeps your edits and how, the file schema, and the actions you can bind elsewhere.

Page 20 of 387 min read

Sixty-two menu files ship per language, in two places that behave completely differently. They live under lang/<code>/, so each language has its own copy; <code> is the language selected in Configuration.

FolderFilesBehaviour
lang/<code>/modules/<id>/menus/, and lang/<code>/menus/currency_select.yml26Written when missing, then kept up to date without undoing your edits. Yours.
lang/<code>/menus/admin/36The whole folder is replaced from the jar on every start, every /survivalcoreadmin reload and every /exylialib reload.
Do not edit anything in `menus/admin/`

Every file in it opens with DO NOT EDIT — REGENERATED ON EVERY STARTUP. It is also regenerated on every reload. Edits there are destroyed silently on the next restart or reload.

The admin editors that live outside that folder are kept like any other owner menu: modules/warps/menus/warp_setup.yml, warp_admin_list.yml and the booster admin screens modules/boosters/menus/admin.yml, presets.yml, preset.yml, running.yml and settings.yml.

A malformed file is named in the log and left unregistered, rather than silently loading empty.

Screens for modules that moved to other plugins (crates, shop, market, protections, vaults, graves, bounties, rewards, AFK zones, economy and the rest) are not shipped here any more; look in the owning plugin's documentation, such as ExyliaCrates and ExyliaMarket.

How your menus are kept up to date#

Every folder of owner menus is refreshed on start and on every reload, before the menus are read. For each file the plugin compares three things: what is on disk, what shipped this time, and the defaults you last had, which it keeps in .defaults/files/ inside the plugin folder.

  • A missing file is written.
  • A key a release adds is written into your file straight away, comments included. Nobody can have chosen something that did not exist yet.
  • A default that changed on a key you never touched is not applied. It waits in /exylialib updates, where you apply it or keep what you have.
  • Anything you changed or deleted is never touched.

A file that does not parse is left alone and reported.

Files that declare a version#

Nearly every owner menu carries a menu-version (homes, kits, rankup, RTP, stats, farming, missions, seasons, projects, warps, boosters, TPA, near and the currency picker). When a release ships a higher number than the file on disk (a file without the key counts as 0), the file is replaced outright, your edits with it, and your previous file is kept next to it as <name>.yml.v<old version>. That is reserved for a layout change an old file cannot survive. Leave menu-version alone.

Deleting a menu no longer brings the default back

Once the plugin has installed a file, a file that goes missing counts as one you deleted, and it is not written again. The menu is then not registered: the log names the file that could not be read, and whatever opens that screen does nothing. To get the shipped file back, delete its copy under .defaults/files/ as well — the same path, .defaults/files/lang/en/modules/homes/menus/homes.yml for lang/en/modules/homes/menus/homes.yml — and reload.

The player-facing menus#

These are the ones worth styling.

MenuOpened by
homes/homes/home, /homes
homes/home_editA home in that list
warps/warp_list/warp
rtp/rtp/rtp with no world
near/near_list/near, when display-mode: UI
tpa/tpa_confirmSending a /tpa with confirm on
kits/list/kit
kits/preview/kit preview, /kitadmin preview
kits/containerA shulker or bundle inside a kit preview
rankup/rankup/rankup
farming/farming/farming
stats/statsThe stats_open action (/stats is never registered; see Combat)
stats/stats-leaderboardA stat row in that screen
missions/missions/missions
seasons/seasons/seasons
seasons/season_boardA season in that list
projects/project/project
boosters/boosters/boosters
menus/currency_selectAny screen that has to ask which currency

The admin screens#

Thirty-six files in menus/admin/, reached from /survivalcoreadmin and from each module's admin command:

  • The hub (hub), the player lookup (players, player, player_homes) and the RTP pool (rtp_pool).
  • Settings: a settings hub (settings, settings_general, settings_modules, settings_modules_hub, settings_modules_travel, settings_modules_more) and one page per module that has tunable values: homes, TPA, RTP, kits, rankup, repair, boosters, reputation and optimization. See Configuration.
  • Content editors: kits (kits_admin_list, kit_admin_edit), item spawners (spawner_*, template_*, chest_* for the loot tables they use), jump pads (jumpad_*), portals (portal_*) and item updates (item_update_*).

They work, and you should not edit them. The plugin replaces the folder from the jar so that a button added in a release reaches servers that already have it.

Outside that folder, modules/warps/menus/warp_setup.yml is the warp editor and modules/boosters/menus/ holds the booster admin screens. Those are kept like any owner menu.

The file schema#

A menu file is:

yaml
title: "…"
size: 54
type: PAGINATION
open_sounds: ["UI_BUTTON_CLICK|1.0|1.0"]
click_sounds: []
refresh: { mode: SMART, interval: 40 }
filler:
  global: { material: GRAY_STAINED_GLASS_PANE, name: " " }
  pagination: { material: BARRIER, name: "Nothing here" }
pagination:
  slots: '10-16,19-25,28-34'
  item_template: { material: "%icon%", name: "%name%", lore: [], actions: ["survivalcore:…"] }
  navigation:
    previous: { slot: 45, material: ARROW }
    next:     { slot: 53, material: ARROW }
items:
  close: { slot: 49, material: BARRIER, name: "Close", actions: ["survivalcore:close_menu"] }
KeyWhat it does
sizeAlways size, never rows
typeDecorative. A menu paginates because it has a pagination: block, not because of this
refresh{mode: ON_CLICK, click_delay: 4} or {mode: SMART, interval: N}
filler.globalThe background
filler.custom.<name>A second filler with its own slots
filler.paginationWhat is drawn when the list is empty
pagination.slots'0-35', or a comma-separated set of ranges
sectionsNamed slot groups with their own templates and navigation. Used by the kit preview and its container screen
animationcenter_out
menu-versionOnly in the files that declare one; see above. Leave it alone

State templates#

A paginated list can draw a row differently depending on its state. lang/<code>/modules/kits/menus/list.yml has four — item_template, cooldown_template, used_template, locked_template — and the kit preview's claim section has six.

Actions#

The key is always actions:, a list of strings. The click type is a prefix inside the string:

yaml
actions:
  - "left: survivalcore:kit_claim %kit_id%"
  - "right: survivalcore:kit_preview %kit_id%"

left:, right:, middle:, shift_left:, shift_right: and drop: are the prefixes; no prefix means any click. survivalcore:<name> is one of this plugin's actions; close, previous_page and next_page are ExyliaLib's own.

Materials#

A Bukkit material, a placeholder (%kit_icon%), basehead-<base64>, playerhead-%name% or playerhead:%name%. Both head forms are in use in the shipped files.

Actions worth binding elsewhere#

The plugin registers 123 actions under the survivalcore: namespace, and they work from any ExyliaLib menu in any plugin — a hub selector, an NPC, a hotbar item. Each one does nothing while its module is off. The ones most worth knowing:

ActionWhat it opens
survivalcore:homes_openThe player's homes
survivalcore:warp_open_listThe warp list
survivalcore:kit_open_listThe kit list
survivalcore:rankup_openThe rank ladder
survivalcore:stats_openThe player's statistics profile
survivalcore:missions_openThe missions
survivalcore:seasons_openThe season list
survivalcore:projects_openThe community project
survivalcore:boosters_openThe player's boosters
survivalcore:settings_hubThe admin settings hub
survivalcore:admin_hubThe admin hub
survivalcore:close_menuClose
An admin action still checks its node

Every action that changes admin state re-checks its module's admin permission inside the handler. Adding an admin button to a player menu does not give anybody access to it — it just gives them a button that refuses.

One registered action has no button

survivalcore:spawner_import_from_chest implements a "click a chest to import its contents as the loot table" flow, and no shipped menu calls it. Binding it in your own menu is the only way to reach it.

Something missing on this page? Tell us on Discord