Skip to content

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

ItemValue
Module version1.1.0
API coordinatesemaki.jiuwu.craft:emaki-accessory-api:1.1.0
Main classemaki.jiuwu.craft.accessory.EmakiAccessoryPlugin
Main command/emakiaccessory
Aliases/eaccessory, /eacc
Required dependencyEmakiCoreLib
Optional dependenciesEmakiItem, EmakiAttribute, EmakiSkills, PlaceholderAPI
Descriptor baselineapi-version: "1.21.8", folia-supported: true
JavaJava 25
Main permissionsemakiaccessory.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

PageContents
Commands and PermissionsSubcommands, page retrieval, administrative commands, and the 6 permission nodes of /emakiaccessory.
ConfigurationSlot sources, death drops, deduplication, and persistence in config.yml, plus the fields of pages/*.yml.
Parts and SlotsPart definitions in parts.yml, slot instance expansion and orphaned slots.
Accessory SetsMembers, slot criteria, piece thresholds and effects in sets/<set>.yml.
GUI TemplateThe four slot types and page switching cells of gui/accessory_gui.yml.
Attributes and SkillsHow accessory attributes reach EmakiAttribute and skills reach EmakiSkills.
API and IntegrationThe facade and query layer of emaki-accessory-api and their thread constraints.
Event APIAccessorySetBonusChangeEvent.

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/*.yml defines 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_enable cell switches the active page.
  • Pages can be permission-gated: a non-empty page permission is 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: 2 in parts.yml expands into the slot instances ring_1 and ring_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 view opens a read-only window, while /eacc admin edit additionally requires emakiaccessory.admin.edit.

File Layout

After the server has run, EmakiAccessory mainly uses the following files:

text
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
PathDescription
config.ymlMain configuration: slot sources, death drops, deduplication, persistence.
parts.ymlAccessory part definitions, deciding which slot instances exist globally.
pages/<page>.ymlAccessory page definition. The id comes from page_id, not the file name; parts decides which parts that page enables.
sets/<set>.ymlAccessory set definition. One set per file; the file name is not used for identification.
gui/accessory_gui.ymlAccessory panel window template, shareable across pages.
lang/*.ymlCommand, window and console messages.

Getting Started

  1. Put EmakiCoreLib-*.jar and EmakiAccessory-*.jar into the server plugins/ folder.
  2. To make accessories grant attributes and skills, also install EmakiAttribute and EmakiSkills, and define the accessory items with EmakiItem.
  3. Do not put emaki-accessory-api-*.jar into plugins/; the API Jar is a compile-time dependency for developers only.
  4. After the first start, review plugins/EmakiAccessory/parts.yml, pages/main.yml, and gui/accessory_gui.yml.
  5. Open your own accessory panel:
text
/eacc open
/eacc open secondary
  1. Inspect all pages and the currently enabled one:
text
/eacc pages
  1. Reload configuration, parts, pages, and sets after editing:
text
/eacc reload

Usage Notes

  • After changing parts or count in parts.yml, place a matching cell with type: "accessory_slot" and the same key name in gui/accessory_gui.yml for every expanded slot instance, and make sure the target page declares that part in its parts list.
  • 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: true is 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[].item in 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 edit only works for online players; /eacc admin clear cannot be undone and is written to the log.