Skip to content

Configuration

plugins/EmakiAccessory/config.yml is the main configuration, and pages/*.yml defines the accessory pages. version is a configuration-structure marker maintained by the project resource sync flow; the plugin merges newly added default keys based on it.

Top-Level Keys

KeyDefaultDescription
version"1.0.3"Configuration structure version, used to merge new default keys.
language"zh_CN"Language file name, resolving to lang/<language>.yml.
release_default_datatrueWhether the bundled default data files (parts.yml plus the examples under pages/ and sets/) are released on every startup. While true, each startup restores missing default examples without overwriting existing files; once false, only existing data is kept and missing examples are no longer generated.
drop_on_deathfalseWhether accessories drop on death.
uniquetrueWhether wearing two identical accessories at once is forbidden.
slot_sourcessee belowAdditional sources declaring which slots an accessory may occupy.
persistencesee belowAutosave and shutdown flush parameters.

drop_on_death

When true, accessories are appended to the death drop list and handled by the vanilla death flow rather than being pushed back into the inventory — the latter would leave the same accessory in both the drops and the inventory.

The option has no effect when another plugin already enabled keepInventory; accessories are kept either way.

unique

The preferred criterion is EmakiItem's item definition id, not the material: two accessories of the same definition count as duplicates even when their levels or affixes differ. When EmakiItem is unavailable, the check falls back to vanilla material comparison, so two accessories sharing a material are treated as duplicates.

slot_sources

Additional sources for the slots an accessory declares it can occupy. EmakiAttribute's active_slot and the EmakiSkills skill payload are always in effect; the two options below are appended on top. All four sources form a union: any match allows the accessory to be worn. With both options disabled, behavior matches a single-source setup.

KeyDefaultDescription
slot_sources.pdc.enabledfalseWhether to read a slot list from the item's PDC.
slot_sources.pdc.key""Full NamespacedKey, used verbatim without case rewriting. A string list is preferred; when absent, a single string is read and split by separator.
slot_sources.lore.enabledfalseWhether to read a slot list from lore using regular expressions.
slot_sources.lore.patternssee defaultsRegex list; capture group 1 of each pattern holds the slot list text. MiniMessage tags are stripped and whitespace collapsed before matching, so write plain-text patterns. An invalid pattern logs a warning and is skipped.
slot_sources.lore.separator","Slot list separator, also used by the pdc string fallback.
slot_sources.lore.aliasessee defaultsMaps display names in lore to part ids in parts.yml. Part ids allow only lowercase letters, digits, and underscores, so localized slot names must be mapped here; unlisted values are normalized as-is.

Accessory pages: pages/*.yml

Each file defines one page. The page id comes from page_id, independent of the file name.

yaml
page_id: "main"
display_name: "<gold>Main Accessories</gold>"
order: 1
gui_template: "accessory_gui"
permission: ""
parts:
  - "necklace"
  - "ring"
  - "belt"
  - "charm"
KeyDescription
page_idPage id, also the storage partition key inside player data.
display_namePage display name with MiniMessage support, used by switch cells and /eacc pages.
orderPage sort order, ascending; the lowest value is the default enabled page.
gui_templateLayout id used by this page; several pages may share one layout.
permissionEmpty means available to everyone; a non-empty value is matched verbatim.
partsParts enabled on this page; every value must be a part id defined in parts.yml.

Three page rules:

  • Isolated storage: the same slot instance id holds a separate accessory on each page, with no overwriting.
  • Only the enabled page contributes: accessories on other pages are kept but produce no attributes, skills, or set piece counts.
  • Losing permission keeps data: when a player loses the enabled page's permission, nothing is cleared and no page switch happens. The page cannot be opened and its accessories stop contributing, and the player recovers items with /eacc retrieve <page>.

Parts listed on a page expand into slot instances according to count in parts.yml, and each instance must be placed in the layout referenced by gui_template; otherwise the slot is unusable and a warning is logged.

persistence

KeyDefaultDescription
autosave_seconds60Autosave interval in seconds. Set to 0 or a negative value to disable timed saving.
drain_timeout_seconds10How many seconds to wait for unflushed writes during shutdown.

With timed saving disabled, data is flushed only when the window closes, when the player quits and when the server shuts down.

After drain_timeout_seconds elapses, the remaining dirty entry count is logged and shutdown continues; the server shutdown flow is never blocked indefinitely.