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
| Key | Default | Description |
|---|---|---|
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_data | true | Whether 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_death | false | Whether accessories drop on death. |
unique | true | Whether wearing two identical accessories at once is forbidden. |
slot_sources | see below | Additional sources declaring which slots an accessory may occupy. |
persistence | see below | Autosave 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.
| Key | Default | Description |
|---|---|---|
slot_sources.pdc.enabled | false | Whether 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.enabled | false | Whether to read a slot list from lore using regular expressions. |
slot_sources.lore.patterns | see defaults | Regex 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.aliases | see defaults | Maps 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.
page_id: "main"
display_name: "<gold>Main Accessories</gold>"
order: 1
gui_template: "accessory_gui"
permission: ""
parts:
- "necklace"
- "ring"
- "belt"
- "charm"| Key | Description |
|---|---|
page_id | Page id, also the storage partition key inside player data. |
display_name | Page display name with MiniMessage support, used by switch cells and /eacc pages. |
order | Page sort order, ascending; the lowest value is the default enabled page. |
gui_template | Layout id used by this page; several pages may share one layout. |
permission | Empty means available to everyone; a non-empty value is matched verbatim. |
parts | Parts 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
| Key | Default | Description |
|---|---|---|
autosave_seconds | 60 | Autosave interval in seconds. Set to 0 or a negative value to disable timed saving. |
drain_timeout_seconds | 10 | How 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.