Skip to content

Parts and Slots

plugins/EmakiAccessory/parts.yml defines every available part, and pages/*.yml then decides which parts each page enables. A part is defined once here and can be referenced by several pages.

Full Example

yaml
parts:
  necklace:
    count: 1
    display_name: "<gold>Necklace</gold>"
    icon: "LIGHT_GRAY_STAINED_GLASS_PANE"

  ring:
    count: 2
    display_name: "<gold>Ring</gold>"
    icon: "LIGHT_GRAY_STAINED_GLASS_PANE"

  belt:
    count: 1
    display_name: "<gold>Belt</gold>"
    icon: "LIGHT_GRAY_STAINED_GLASS_PANE"

  charm:
    count: 2
    display_name: "<gold>Charm</gold>"
    icon: "LIGHT_GRAY_STAINED_GLASS_PANE"

Fields

FieldDescription
countHow many slot instances this part expands into.
display_namePart display name; MiniMessage is supported.
iconPlaceholder material shown for an empty slot.

Slot Instance Expansion

Every part expands into count slot instances whose ids are <partId>_<index>, with the index starting at 1.

In the example above the ring part has count: 2 and expands into ring_1 and ring_2:

PartcountExpanded slot instances
necklace1necklace_1
ring2ring_1, ring_2
belt1belt_1
charm2charm_1, charm_2

Part Id Naming Constraints

A part id may only use lowercase letters, digits and underscores, and must not end with _<number> — that form collides with slot instance ids (writing ring_2 would clash with the second cell of the ring part).

Invalid ids are rejected with a warning; the plugin will not rename them for you.

Pages and the Window Must Match

After editing parts.yml, two steps remain:

  1. Add the part to the parts list of a pages/*.yml file, or it belongs to no page and players never see it.
  2. Every expanded slot needs a cell with type: "accessory_slot" and the same key name in the layout the page uses (the gui/*.yml referenced by gui_template), or the player cannot use that slot.

When several pages reference the same part, each page stores its accessories separately with no overwriting; only the enabled page produces attributes, skills, and set piece counts.

Shrinking count, deleting a part, or removing a part from a page's parts turns existing accessories into orphans, recovered through an orphan_slot or /eacc retrieve <page>. See GUI Template and Configuration.

yaml
slots:
  ring_1:
    slots: [12]
    type: "accessory_slot"
  ring_2:
    slots: [13]
    type: "accessory_slot"

Orphaned Slots

Shrinking count or deleting a part deletes no data: accessories left in a vanished slot become "orphans" and appear in the window's orphan_slot area for the player to retrieve.

Once retrieved they cannot be put back. Orphaned accessories also never count toward set piece totals, so removing a part from the configuration can lower the count reported by set events.