EmakiCoreLib
EmakiCoreLib is the shared runtime core for every Emaki Series business plugin. It does not provide a full gameplay loop by itself. Instead, it provides cross-plugin foundations: actions, GUI templates, item-source resolution, PDC helpers, item assembly, conditions, expressions, economy bridges, weighted random utilities, JavaScript scripting, scheduler compatibility, and shared bStats runtime.
Sectioning rule: this page documents capabilities that all plugins can reuse. Actions, script modules, APIs, configuration fields, and gameplay flows that are registered by Attribute, Forge, Strengthen, Cooking, Gem, Skills, Item, or Level belong to the corresponding plugin documentation.
Basic information
| Item | Value |
|---|---|
| Version | 4.6.3 |
| API jar | emaki-corelib-api-4.6.3.jar |
| Runtime plugin jar | EmakiCoreLib-4.6.3.jar |
| Main class | emaki.jiuwu.craft.corelib.EmakiCoreLibPlugin |
| Java | 25 |
| Paper API | 1.21.8-R0.1-SNAPSHOT |
| paper-plugin.yml api-version | 1.21.8 |
| folia-supported | true |
| Hard dependencies | None |
| Soft dependencies | Vault, ExcellentEconomy, PlaceholderAPI, MMOItems, MythicMobs, ItemsAdder, Nexo, Oraxen, EcoItems, NeigeItems, CraftEngine, PacketEvents |
| Main command | /emakicorelib (aliases /corelib, /emakicore) |
| Permissions | emakicorelib.admin, emakicorelib.reload |
CoreLib must load first. Business plugins depend on its shared services. If CoreLib fails to start, fix CoreLib before debugging other modules.
Runtime compatibility
CoreLib emits a compatibility report during startup. Missing Java 25 or Paper/Folia capabilities prevent startup; Minecraft versions below 1.21.8, unknown versions, and 1.22.0 or newer are reported as unverified with warnings rather than being rejected through a guessed version allowlist. Dependent plugins can read this report through EmakiCoreLibApi.compatibilityReport().
Installation boundary
Install only runtime plugin jars on the server:
plugins/
├── EmakiCoreLib-4.6.3.jar
└── EmakiAttribute-4.6.3.jar / EmakiForge-4.6.0.jar / ...Do not put emaki-corelib-api-*.jar into the server plugins/ directory. API jars are for third-party developers as Maven provided or Gradle compileOnly dependencies.
What CoreLib provides
Shared action system
The action system lets plugins run messages, sounds, particles, commands, economy operations, experience operations, temporary items, blocks, teleporting, scripts, and action templates from YAML. See Actions for syntax, control prefixes, CoreLib built-in actions, and the /corelib action list|run admin command.
Business plugins may append their own actions to the same registry. Level exp actions, Attribute stat actions, and Skills skill actions are documented on their own plugin pages instead of being centralized here.
GUI system
The GUI system provides menu templates, slot parsing, buttons, click handling, sessions, item-source resolution, and dynamic rendering foundations. Business plugins declare their own GUI files and runtime flows. See GUI.
Item Source
The Item Source system resolves Vanilla, CraftEngine, ItemsAdder, Nexo, Oraxen, EcoItems, MMOItems, NeigeItems, EmakiItem, and other item providers so recipes, materials, rewards, and GUI slots can use stable IDs instead of display names or lore. See Item Source.
PDC and item assembly
CoreLib wraps Bukkit PersistentDataContainer and uses Assembly to merge layers written by different modules into the final item name and lore. Forge, Strengthen, Gem, Item, Attribute, and other modules use this chain to avoid overwriting each other. See PDC, Assembly, and Name & Lore Operations.
Shared gameplay events
CoreLib normalizes selected Bukkit / MythicMobs gameplay events into configuration event IDs reused by EmakiLevel experience sources and EmakiCodex advancement triggers. See Gameplay Event IDs for usable IDs and variables.
Conditions, expressions, economy, and weights
- Condition: shared condition expressions and condition groups.
- Expression: formulas for cost, chance, level, damage, and configuration values.
- Economy: Vault / ExcellentEconomy providers and dynamic provider enumeration.
- Weight: reusable tools for random pools, quality pools, reward pools, and pity systems.
JavaScript scripting
CoreLib provides the GraalJS runtime, runjs action, global script extensions, controlled server API, and dynamic module entry points. Business plugins register their own emaki.module("...") capabilities when enabled; plugin-specific methods are documented on their API pages. See JavaScript.
Recommended reading order
Server owners / configuration maintainers
- Item Source: learn how to reference materials and rewards reliably.
- Actions: learn success/failure/reward/feedback and script calls.
- Condition: configure permission, item, state, and expression checks.
- Expression: write cost, chance, and numeric formulas.
- GUI: adjust menu layout and button behavior.
- The corresponding business plugin pages for actual gameplay configuration.
Third-party developers
- PDC: understand shared data boundaries.
- Assembly: understand multi-module presentation merging.
- JavaScript: understand scripting and dynamic modules.
- The corresponding plugin API pages: call public APIs, not implementation classes.
Default runtime folder
plugins/EmakiCoreLib/
├── config.yml
├── lang/
│ ├── zh_CN.yml
│ └── en_US.yml
└── scripts/
├── global/
├── mythic/
├── extensions/
│ └── global/
├── templates/
└── examples/The subfolders created under scripts/ come from script.paths.create_directories, which defaults to global, mythic, extensions/global, templates, and examples; script.paths.root changes the root folder name. Setting release_default_data: false stops CoreLib from writing the bundled example scripts into scripts/examples.
config.yml controls language, the GUI backend, shared gameplay events, action loops and action templates, the script engine and its security limits, and global Debug. Setting debug.global_all to true enables Debug output for every Emaki module that uses CoreLib's DebugLogger. Administrators can also toggle it temporarily with /corelib debug all on|off|status; a CoreLib reload restores the configured value. lang/ stores CoreLib messages. scripts/ is the CoreLib scripting runtime folder. Business plugins generate their own folders; do not mix business configuration into CoreLib unless that page explicitly says so.