EmakiAccessory
EmakiAccessory is the accessory slot module of the Emaki series. It gives players a separate GUI accessory panel that does not occupy vanilla equipment slots, while accessories worn in it still provide attributes and skills.
The panel is multi-page: parts.yml defines the global parts and slot instances, pages/*.yml decides which parts each page enables, and gui/accessory_gui.yml describes the layout. Page storage is isolated, but only the currently enabled page produces attributes, skills, and set piece counts. Accessory attributes and skills reach the player through EmakiAttribute's contribution provider and EmakiSkills' skill source, so no extra slot configuration is needed in those modules.
Basic Information
| Item | Value |
|---|---|
| Module version | 1.1.0 |
| API coordinates | emaki.jiuwu.craft:emaki-accessory-api:1.1.0 |
| Main class | emaki.jiuwu.craft.accessory.EmakiAccessoryPlugin |
| Main command | /emakiaccessory |
| Aliases | /eaccessory, /eacc |
| Required dependency | EmakiCoreLib |
| Optional dependencies | EmakiItem, EmakiAttribute, EmakiSkills, PlaceholderAPI |
| Descriptor baseline | api-version: "1.21.8", folia-supported: true |
| Java | Java 25 |
| Main permissions | emakiaccessory.use (default true), emakiaccessory.reload (op), emakiaccessory.debug (op), emakiaccessory.admin (op), emakiaccessory.admin.edit (op), emakiaccessory.page.secondary (op, example page permission) |
Feature Pages
| Page | Contents |
|---|---|
| Commands and Permissions | Subcommands, page retrieval, administrative commands, and the 6 permission nodes of /emakiaccessory. |
| Configuration | Slot sources, death drops, deduplication, and persistence in config.yml, plus the fields of pages/*.yml. |
| Parts and Slots | Part definitions in parts.yml, slot instance expansion and orphaned slots. |
| Accessory Sets | Members, slot criteria, piece thresholds and effects in sets/<set>.yml. |
| GUI Template | The four slot types and page switching cells of gui/accessory_gui.yml. |
| Attributes and Skills | How accessory attributes reach EmakiAttribute and skills reach EmakiSkills. |
| API and Integration | The facade and query layer of emaki-accessory-api and their thread constraints. |
| Event API | AccessorySetBonusChangeEvent. |
Core Capabilities
- Separate accessory panel: the accessory panel is its own GUI. It occupies no vanilla equipment slot and shares no slot with EmakiItem equipment.
- Multiple pages with isolated storage:
pages/*.ymldefines the pages, and the same slot instance id holds a separate accessory on each page without overwriting. - Only the enabled page contributes: accessories on other pages keep their data but stop providing attributes, skills, and set piece counts; the
page_enablecell switches the active page. - Pages can be permission-gated: a non-empty page
permissionis matched verbatim. Losing it clears no data and does not switch pages; the player recovers items with/eacc retrieve <page>. - Parts expand into slot instances: a part configured with
count: 2inparts.ymlexpands into the slot instancesring_1andring_2, with one window cell per instance. - Attributes parsed by the same code as equipment: accessory attributes go through EmakiAttribute's own parser, so an accessory and a helmet carrying identical data produce identical numbers, with parent-attribute expansion and range-spread companion keys coming along.
- Thresholds are cumulative: wearing 3 pieces activates the 2-piece and 3-piece tiers at the same time, not one instead of the other.
- Accessory sets never mix with equipment sets: accessory sets only count pieces inside accessory slots while EmakiItem only counts the equipment slots. One item may belong to both, and each side counts independently.
- Orphaned slots keep their data: shrinking
count, deleting a part, or removing a part from a page deletes nothing. Accessories in a slot that page no longer declares become "orphans" and appear in that page's orphan area for retrieval. The check is per owning page, so accessories on other pages are never treated as orphans. - Administrators can view and edit:
/eacc admin viewopens a read-only window, while/eacc admin editadditionally requiresemakiaccessory.admin.edit.
File Layout
After the server has run, EmakiAccessory mainly uses the following files:
plugins/EmakiAccessory/
├─ config.yml
├─ parts.yml
├─ pages/
│ ├─ main.yml
│ └─ secondary.yml
├─ sets/
│ └─ example_set.yml
├─ gui/
│ └─ accessory_gui.yml
└─ lang/
├─ zh_CN.yml
└─ en_US.yml| Path | Description |
|---|---|
config.yml | Main configuration: slot sources, death drops, deduplication, persistence. |
parts.yml | Accessory part definitions, deciding which slot instances exist globally. |
pages/<page>.yml | Accessory page definition. The id comes from page_id, not the file name; parts decides which parts that page enables. |
sets/<set>.yml | Accessory set definition. One set per file; the file name is not used for identification. |
gui/accessory_gui.yml | Accessory panel window template, shareable across pages. |
lang/*.yml | Command, window and console messages. |
Getting Started
- Put
EmakiCoreLib-*.jarandEmakiAccessory-*.jarinto the serverplugins/folder. - To make accessories grant attributes and skills, also install EmakiAttribute and EmakiSkills, and define the accessory items with EmakiItem.
- Do not put
emaki-accessory-api-*.jarintoplugins/; the API Jar is a compile-time dependency for developers only. - After the first start, review
plugins/EmakiAccessory/parts.yml,pages/main.yml, andgui/accessory_gui.yml. - Open your own accessory panel:
/eacc open
/eacc open secondary- Inspect all pages and the currently enabled one:
/eacc pages- Reload configuration, parts, pages, and sets after editing:
/eacc reloadUsage Notes
- After changing parts or
countinparts.yml, place a matching cell withtype: "accessory_slot"and the same key name ingui/accessory_gui.ymlfor every expanded slot instance, and make sure the target page declares that part in itspartslist. - Attributes, skills, and set piece counts only count the currently enabled page. Accessories on a page take effect only after the player switches to it.
unique: trueis judged by EmakiItem's item definition id where available. It does not switch off when EmakiItem is absent; it falls back to vanilla material matching, so two accessories of the same material count as duplicates.pieces[].itemin accessory sets also depends on EmakiItem definition ids; the whole set is inactive when EmakiItem is absent.- A part id must not end with
_<number>, which would collide with slot instance ids. /eacc admin editonly works for online players;/eacc admin clearcannot be undone and is written to the log.