Architecture Overview
Overall Architecture Diagram
mermaid
graph TB
subgraph Runtime["Runtime Environment"]
Server["Spigot 1.21+"]
end
subgraph Infra["Infrastructure Layer"]
CoreLib["EmakiCoreLib<br/>Action / GUI / ItemSource / Assembly<br/>Structured Presentation / PDC / YAML / Economy"]
end
subgraph Business["Business Plugin Layer"]
Attribute["EmakiAttribute<br/>Attributes / Combat / Damage Pipeline"]
Forge["EmakiForge<br/>Forging / Recipes / Editor"]
Strengthen["EmakiStrengthen<br/>Strengthening / Star Levels / Attempt Flow"]
Gem["EmakiGem<br/>Gems / Socket Opening / Inlaying / Upgrading"]
Cooking["EmakiCooking<br/>Four-Station Cooking / World Station State"]
Skills["EmakiSkills<br/>Active Skills / Triggers / Casting Modes"]
end
subgraph Optional["Optional Ecosystem"]
Mythic["MythicMobs"]
CraftEngine["CraftEngine"]
ItemsAdder["ItemsAdder"]
Nexo["Nexo"]
end
Attribute --> CoreLib
Forge --> CoreLib
Strengthen --> CoreLib
Gem --> CoreLib
Cooking --> CoreLib
Skills --> CoreLib
Forge -.->|"softdepend"| Attribute
Strengthen -.->|"softdepend"| Attribute
Gem -.->|"softdepend"| Attribute
Skills -.->|"ServicesManager"| Attribute
Skills -.->|"Mythic API"| Mythic
Cooking -.->|"Block Bridge"| CraftEngine
Cooking -.->|"Block Bridge"| ItemsAdder
Cooking -.->|"Block Bridge"| Nexo
CoreLib --> ServerArchitecture Explanation
- EmakiCoreLib is the sole shared infrastructure layer across the entire repository, and serves as the center for "item layer snapshot → rebuild presentation → preserve cross-module state".
- EmakiAttribute handles attributes, damage, resources, and combat feedback on one hand, while providing optional collaboration boundaries for other modules through
PdcAttributeApiandEmakiAttributeBridgeon the other. - EmakiForge / EmakiStrengthen / EmakiGem all have a hard dependency on CoreLib and collaborate with Attribute via soft dependencies.
- EmakiCooking follows a "world stations + state persistence + CoreLib item source/action/block bridging" approach.
- EmakiSkills follows an "unlock source collection + skill slots + triggers + casting modes + MythicMobs/EmakiAttribute bridging" approach, and does not carry the skill effect implementations itself.
Shared Runtime Pattern
Multiple business modules follow a similar startup and reload chain:
- Initialize
LifecycleCoordinator - Assemble
RuntimeComponents - Load language files, configurations, and recipe/data directories
- Call
BootstrapServiceto handle versioned files and default resources - Initialize GUI, message services, item sources, bridge services, and business services
- Register command routers, event listeners, or service exposures
- On reload, re-load configurations and refresh online players' items/GUI sessions/runtime state
Shared Infrastructure Usage Matrix
| CoreLib Capability | Attribute | Forge | Strengthen | Cooking | Gem | Skills |
|---|---|---|---|---|---|---|
GuiService | Indirect | ✅ | ✅ | Steamer only | ✅ | ✅ |
ActionExecutor | ✅ | ✅ | ✅ | ✅ | ✅ | Minimal |
ItemSourceService | Indirect | ✅ | ✅ | ✅ | ✅ | Indirect |
EmakiItemAssemblyService | Name read | ✅ | ✅ | Indirect | ✅ | — |
StructuredPresentationRenderer | Preview | ✅ | ✅ | Indirect | ✅ | — |
MessageService | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
BootstrapService | Custom | ✅ | ✅ | ✅ | ✅ | ✅ |
PdcAttributeGateway | Provides API | ✅ | ✅ | — | ✅ | — |
EmakiAttributeBridge | Provides service | — | — | — | — | ✅ |
AdventureSupport / MiniMessages | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Cross-Module Contracts
- EmakiAttribute provides
PdcAttributeApi(registered via BukkitServicesManager) and exposesEmakiAttributeBridgeviaServicesManager. CoreLib'sPdcAttributeGatewaydiscovers and proxies this API on the caller side - EmakiCoreLib handles namespace layer assembly, removal, and rebuilding
- EmakiForge / EmakiStrengthen / EmakiGem use their respective source IDs to write snapshots and optional attribute payloads
- EmakiCooking coordinates world station identification through
CustomBlockBridge(CraftEngine / ItemsAdder / Nexo) andItemSourceService - EmakiSkills chains active skill control through trigger dispatching,
MythicBridge, andEaBridge
External Ecosystem Dependencies
CoreLib Optional Integrations
Vault · ExcellentEconomy · PlaceholderAPI · MMOItems · ItemsAdder · Nexo · NeigeItems · CraftEngine
CoreLib Bundled Library Declarations
adventure-platform-bukkit · adventure-text-minimessage · adventure-text-serializer-legacy · adventure-text-serializer-plain · exp4j · boosted-yaml
Business Module Collaboration
- Forge / Strengthen / Gem all have a hard dependency on
EmakiCoreLiband a soft dependency onEmakiAttribute - Cooking has a hard dependency on
EmakiCoreLiband soft dependencies onCraftEngine,ItemsAdder,Nexo - Skills has a hard dependency on
EmakiCoreLiband soft dependencies onMythicMobs,EmakiAttribute, andPlaceholderAPI