EmakiItem
EmakiItem provides lightweight custom items, stable item IDs, sets, trigger actions, auto update, and PlaceholderAPI support. It is often the starting point for equipment progression.
Module facts
| Item | Value |
|---|---|
| Module version | 2.6.1 |
| Main command | /emakiitem |
| Alias | /ei |
| Hard dependency | EmakiCoreLib |
| Soft dependencies | EmakiAttribute, EmakiSkills, PlaceholderAPI |
| Permissions | emakiitem.use, emakiitem.give, emakiitem.inspect, emakiitem.update, emakiitem.reload, emakiitem.debug, emakiitem.admin |
Pages
| Page | Contents |
|---|---|
| Commands | Listing and giving items, inspecting the held item and its components, refreshing items and sets, reload and debug. |
| Definitions and Sets | The fields of items/*.yml and sets/*.yml, and how an item ID produces an ItemStack. |
| Triggers | Running actions on interact, attack, projectile, block, and drop events. |
| Update Strategy | Bringing items players already hold up to a changed definition. |
| Repair System | The disabled state at zero durability and the material/currency repair flow. |
| Cross-Module Integration | Item source syntax when Attribute, Forge, Strengthen, Gem, Skills, or Cooking reference an item. |
| Placeholders | PlaceholderAPI output. |
| CoreLib Actions | Main-hand update, redraw, repair, durability, and vanilla data component actions. |
| API | Creating, identifying, and querying items through EmakiItemApi. |
| Event API | Bukkit events and interception points across the item flow. |
| JavaScript | The item script module, runtime definitions, and item factories. |
Core capabilities
| Capability | Description |
|---|---|
| Stable item ID | Uses config IDs instead of display names. |
| Item components | Configures material, name, lore, model, enchants, flags, durability, and more. |
| Attribute output | Can provide attribute payloads to Attribute. |
| Skill binding | Can expose skills or skill unlock data. |
| Set system | Grants attributes, skills, or lore based on equipped piece count. |
| Triggers | Runs actions on interaction, combat, projectile, block, drop, and other events. |
| Auto update | Refreshes item state on login, hand switch, inventory click, pickup, and similar cases. |
| Repair system | Items enter a disabled state at zero durability and can be repaired with materials or currency. |
| ID aliases and migration | Maps renamed item IDs and can migrate configs and player inventories in bulk. |
Default runtime folder
text
plugins/EmakiItem/
├── config.yml
├── id_aliases.yml
├── items/
├── sets/
├── gui/
└── lang/items/ defines items, sets/ defines item sets, gui/ holds the repair interface template, and id_aliases.yml stores renamed item ID mappings.
Main configuration
config.yml contains only global settings; item behavior lives in the individual definition files.
| Key | Type | Default | Description |
|---|---|---|---|
version | string | Current module version | Marks the default config structure; manual edits are discouraged. |
language | string | zh_CN | Language file ID, matching lang/<language>.yml. |
release_default_data | boolean | true | Whether to release default sample data such as items/ and sets/. This does not control config.yml or language files. |
set_bonus.enabled | boolean | true | Whether the set bonus system is enabled. |
set_bonus.refresh_triggers.join | boolean | true | Refresh set state when a player joins. |
set_bonus.refresh_triggers.held_change | boolean | true | Refresh when the held item changes. |
set_bonus.refresh_triggers.inventory_click | boolean | true | Refresh on inventory click. |
set_bonus.refresh_triggers.inventory_drag | boolean | true | Refresh on inventory drag. |
set_bonus.refresh_triggers.pickup | boolean | true | Refresh on item pickup. |
set_bonus.refresh_triggers.interact | boolean | true | Refresh on interaction. |
set_bonus.refresh_triggers.command | boolean | true | Allow refresh when related commands run. |
set_bonus.refresh_triggers controls set state refreshing, while item auto-update is controlled separately by update.triggers in an item definition; neither overrides the other.
Typical item lifecycle
- Define item IDs, material, name, lore, and components in
items/. - Optionally add Attribute stats, Skills, or set info.
- An administrator gives out the item.
- A player uses the item.
- Item automatically refreshes its state when triggered.
- Forge / Strengthen / Gem can continue writing their own layers on top.
- CoreLib rebuilds the final presentation.
Relations with other modules
| Module | Integration |
|---|---|
| EmakiAttribute | Item writes base or set attributes. |
| EmakiSkills | Item writes equipment skill IDs and forced equipment triggers. The PDC keys are owned by a standalone protocol module and do not depend on EmakiSkills being enabled. |
| EmakiForge | Forge can modify items created by EmakiItem. |
| EmakiStrengthen | Strengthen can strengthen EmakiItem equipment. |
| EmakiGem | Gem can add sockets and inlay gems onto EmakiItem equipment. |