Skip to content

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

ItemValue
Module version2.8.0
Main command/emakiitem
Alias/ei
Hard dependencyEmakiCoreLib
Soft dependenciesEmakiAttribute, EmakiSkills, MythicMobs, PlaceholderAPI
Permissionsemakiitem.use, emakiitem.give, emakiitem.browse, emakiitem.inspect, emakiitem.update, emakiitem.reload, emakiitem.debug, emakiitem.admin

Pages

PageContents
CommandsListing and giving items, inspecting the held item and its components, refreshing items and sets, reload and debug.
Definitions and SetsThe fields of items/*.yml and sets/*.yml, and how an item ID produces an ItemStack.
Browser GUIThe two-level browser opened by /ei browse, pack.yml pack metadata, and slot types.
TriggersRunning actions on interact, attack, projectile, block, and drop events.
Update StrategyBringing items players already hold up to a changed definition.
Repair SystemThe disabled state at zero durability and the material/currency repair flow.
Cross-Module IntegrationItem source syntax when Attribute, Forge, Strengthen, Gem, Skills, or Cooking reference an item.
MythicMobs IntegrationDropping EmakiItem items from MythicMobs Drops.
PlaceholdersPlaceholderAPI output.
CoreLib ActionsMain-hand update, redraw, repair, durability, and vanilla data component actions.
APICreating, identifying, and querying items through EmakiItemApi.
Event APIBukkit events and interception points across the item flow.

Core capabilities

CapabilityDescription
Stable item IDUses config IDs instead of display names.
Item componentsConfigures material, name, lore, model, enchants, flags, durability, and more.
Attribute outputCan provide attribute payloads to Attribute.
Skill bindingCan expose skills or skill unlock data.
Set systemGrants attributes, skills, or lore based on equipped piece count.
TriggersRuns actions on interaction, combat, projectile, block, drop, and other events.
Auto updateRefreshes item state on login, hand switch, inventory click, pickup, and similar cases.
Repair systemItems enter a disabled state at zero durability and can be repaired with materials or currency.
Browser GUIA two-level GUI browses every item by pack and takes pieces directly.
ID aliases and migrationMaps 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 and two browser templates (repair_gui.yml, pack_browser_gui.yml, item_browser_gui.yml), and id_aliases.yml stores renamed item ID mappings.

Every subdirectory of items/ is an item pack and may carry a pack.yml defining its icon in the browser; see Browser GUI.

Main configuration

config.yml contains only global settings; item behavior lives in the individual definition files.

KeyTypeDefaultDescription
versionstringCurrent module versionMarks the default config structure; manual edits are discouraged.
languagestringzh_CNLanguage file ID, matching lang/<language>.yml.
release_default_databooleantrueWhether to release default sample data such as items/ and sets/. This does not control config.yml or language files.
data_directories.max_depthint2Maximum subdirectory scan depth for items/ and sets/, counting the data directory itself. 1 reads only the root, 2 allows one level of subdirectories, 3 allows two. Directories beyond the limit are skipped with a console warning; the minimum value is 1.
set_bonus.enabledbooleantrueWhether the set bonus system is enabled.
set_bonus.refresh_triggers.joinbooleantrueRefresh set state when a player joins.
set_bonus.refresh_triggers.held_changebooleantrueRefresh when the held item changes.
set_bonus.refresh_triggers.inventory_clickbooleantrueRefresh on inventory click.
set_bonus.refresh_triggers.inventory_dragbooleantrueRefresh on inventory drag.
set_bonus.refresh_triggers.pickupbooleantrueRefresh on item pickup.
set_bonus.refresh_triggers.interactbooleantrueRefresh on interaction.
set_bonus.refresh_triggers.commandbooleantrueAllow refresh when related commands run.
mythicmobs.enabledbooleantrueMaster switch for the MythicMobs integration.
mythicmobs.drops.enabledbooleantrueWhether the MythicMobs custom drop is registered.
mythicmobs.drops.nameslistemakiitem, ei_itemRecognized drop names; falls back to the defaults when empty.
item_state.clampbooleantrueWhether written values are clamped to the min/max declared in fields. Only overflow protection remains when disabled.
item_state.fill_defaultsbooleantrueWhether add uses the fields default as the starting value when the field is absent. A missing field is rejected outright when disabled.
item_state.fieldsmap{}Field declarations keyed by state key name, carrying type, default, min, max, and thresholds. Only numeric types support min/max and thresholds; undeclared fields are unaffected by clamping, defaults, and thresholds.
item_state.migrationsmap{}Migration steps per schema version. Each step declares from/to and may rename, retype, or drop fields. Empty means no migration.
item_state.preservation.verify_rebuildbooleantrueVerify state survives an item rebuild and backfill from the pre-rebuild snapshot when it is missing.
item_state.preservation.repair_on_pickupbooleanfalseRepair damaged state metadata on pickup.
item_state.preservation.repair_on_dropbooleanfalseRepair damaged state metadata on drop.
item_state.preservation.repair_on_tradebooleanfalseRepair damaged state metadata on trade.
item_state.preservation.repair_on_container_transferbooleanfalseRepair damaged state metadata on container transfer.
item_state.preservation.repair_on_joinbooleanfalseRepair damaged state metadata when a player joins.
item_state.derivation.enabledbooleanfalseMaster switch for state-change-driven derived refreshes.
item_state.derivation.refresh_lorebooleantrueRefresh set lore during a derived refresh.
item_state.derivation.refresh_attributesbooleantrueSync attributes during a derived refresh.
item_state.derivation.scan_holderbooleantrueAllow scanning online players to locate the item when holder information is missing.
item_state.derivation.max_depthint2Maximum recursion depth for derived refreshes and threshold rewards, blocking self-triggering loops.
proficiency_guard.dedupe_per_eventbooleantrueDispatch one item definition at most once per event.
proficiency_guard.max_dispatches_per_eventint0Maximum dispatches per event; 0 means unlimited.
proficiency_guard.same_target_cooldown_secondsint0Cooldown in seconds against the same target; 0 means no cooldown.
proficiency_guard.daily_soft_capint0Daily soft cap; 0 means no cap. Counts live in memory, reset on the server's local date change, and do not survive a restart.
proficiency_guard.decay_factordouble1.0Decay factor once the soft cap is exceeded, in (0, 1]; 1.0 rejects outright past the cap.
proficiency_guard.decay_minimum_ratiodouble0.0Lower bound for the decayed pass probability, in [0, 1].
proficiency_guard.guarded_triggerslistdamage_dealt, kill_entity, kill_playerTriggers governed by this section.

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.

item_state.* applies to the emaki:item_state PDC partition and is read and written by the item_state_* action stages and the API. The whole section is additive: leaving it untouched keeps the previous behavior. proficiency_guard.* applies to slot dispatch for damage_dealt, kill_entity, and kill_player; everything except dedupe_per_event defaults to disabled or unlimited.

Typical item lifecycle

  1. Define item IDs, material, name, lore, and components in items/.
  2. Optionally add Attribute stats, Skills, or set info.
  3. An administrator gives out the item.
  4. A player uses the item.
  5. Item automatically refreshes its state when triggered.
  6. Forge / Strengthen / Gem can continue writing their own layers on top.
  7. CoreLib rebuilds the final presentation.

Relations with other modules

ModuleIntegration
EmakiAttributeItem writes base or set attributes.
EmakiSkillsItem 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.
EmakiForgeForge can modify items created by EmakiItem.
EmakiStrengthenStrengthen can strengthen EmakiItem equipment.
EmakiGemGem can add sockets and inlay gems onto EmakiItem equipment.
MythicMobsMythicMobs mobs can drop EmakiItem items through Drops.