
EmakiCorelib
Shared native Java core library for the Emaki plugin suite
EmakiCorelib 3.1.0
release16 апреля 2026 г.EmakiCoreLib Changelog
[3.1.0] - 2026-04-16
Added
- Added shared
AbstractEmakiPlugin,AbstractConfigurableEmakiPlugin,BaseAppConfig, and a reusableGuiTemplateLoaderso gameplay modules can share one runtime, config, and GUI template foundation. - Added
ItemSourceService.displayName,InventoryItemUtil, andPlayerSessionMapto unify item display-name lookup, inventory counting/removal, and per-player session tracking.
Improved
- Refactored the reflective CraftEngine, ItemsAdder, MMOItems, NeigeItems, and Nexo item resolvers behind shared base classes so availability checks, loaded-state detection, and fallback behavior stay consistent.
- Updated
GuiService,GuiSession,GuiTemplateParser, andItemComponentParserto supportsounds.left_click/sounds.right_click,hide_tooltip, andtooltip_display, while tightening session switching during async GUI rendering. - Normalized item-source comparisons and text bridging so
minecraft:prefixes,itemName, vanilla translation keys, and custom names all flow through one display pipeline.
Fixed
- Fixed a race where an older GUI session could overwrite a newer one after async rendering completed, reducing stale pages, orphaned sessions, and mismatched close callbacks.
- Fixed item-name handling so it no longer depends on
displayNameonly;itemNameand vanilla translated names now work without relying on runtime-specific APIs. - Fixed vanilla item-source matching when one side used a
minecraft:prefix and the other did not.
EmakiCorelib 3.0.0
release12 апреля 2026 г.📦 EmakiCoreLib 更新日志 / Changelog
中文版
✨ 新增特性
-
物品文本桥接:
ItemTextBridge.java新增- 提供跨版本文本 API 兼容性支持
- 确保在不同 Paper/Spigot 版本间的文本显示一致性
-
MiniMessages 支持:
MiniMessages.java新增/增强- 新增 MiniMessage 格式解析支持
- 提供更丰富的文本格式化能力
-
IndexedLineInsertActionParser: 新增 Lore 插入解析器
- 支持从顶部/底部插入 Lore 行
- 支持统计行插入模式
-
生命周期框架: 新增抽象生命周期协调器
AbstractLifecycleCoordinator.java: 抽象基类RuntimeComponents.java: 运行时组件抽象
-
服务注册表:
EmakiServiceRegistry.java新增- 提供服务注册和查找功能
- 支持服务依赖注入
-
YAML 抽象重构: 新增完整的 YAML 抽象层
YamlConfigLoader.java: YAML 配置加载器VersionedYamlFile.java: 版本化 YAML 文件支持YamlSection.java: YAML 节抽象接口BoostedYamlSection.java: 增强型 YAML 节实现MapYamlSection.java: Map backed YAML 节实现SnakeYamlSupport.java: SnakeYAML 底层支持
-
Bootstrap 包: 新增 bootstrap 包结构
- 提供插件启动引导支持
-
Entity 包: 新增 entity 包结构
- 提供实体相关功能
-
Integration 包: 新增 integration 包结构
- 提供第三方插件集成支持
🐛 问题修复
- YAML 合并逻辑优化: 修复配置合并时的类型处理问题
- 改进
mergeMissingValues方法,使用 YamlSection 替代 ConfigurationSection - 优化版本比较逻辑,新增
compareVersions方法
- 改进
🚀 优化与改进
-
YAML 文件重构:
YamlFiles.java大量重构- 简化版本升级逻辑
- 优化配置合并流程
- 改进类型转换处理
-
文本工具增强:
Texts.java优化- 新增文本空白检测方法
- 优化文本处理性能
-
配置版本升级:
config.yml: 2.3.0 → 3.0.0lang/zh_CN.yml: 2.3.0 → 3.0.0
-
MessageService 优化: 重构消息服务
- 优化消息发送逻辑
- 改进文本格式化
♻️ 架构与底层
-
核心服务重构: 多个核心服务类进行重构和优化
- 改进服务注册和获取流程
- 优化服务依赖管理
-
依赖管理: 优化 Maven 依赖配置
- 减少传递依赖冲突
- 更新库版本
-
代码格式化: 统一代码风格和导入格式
English Version
✨ Features
-
Item Text Bridge:
ItemTextBridge.javaadded- Provides cross-version text API compatibility support
- Ensures text display consistency across different Paper/Spigot versions
-
MiniMessages Support:
MiniMessages.javaadded/enhanced- Added MiniMessage format parsing support
- Provides richer text formatting capabilities
-
IndexedLineInsertActionParser: New Lore insertion parser
- Supports inserting Lore lines from top/bottom
- Supports stat line insertion modes
-
Lifecycle Framework: Added abstract lifecycle coordinator
AbstractLifecycleCoordinator.java: Abstract base classRuntimeComponents.java: Runtime components abstraction
-
Service Registry:
EmakiServiceRegistry.javaadded- Provides service registration and lookup functionality
- Supports service dependency injection
-
YAML Abstraction Refactoring: Added complete YAML abstraction layer
YamlConfigLoader.java: YAML configuration loaderVersionedYamlFile.java: Versioned YAML file supportYamlSection.java: YAML section abstraction interfaceBoostedYamlSection.java: Enhanced YAML section implementationMapYamlSection.java: Map-backed YAML section implementationSnakeYamlSupport.java: SnakeYAML low-level support
-
Bootstrap Package: Added bootstrap package structure
- Provides plugin startup bootstrap support
-
Entity Package: Added entity package structure
- Provides entity-related functionality
-
Integration Package: Added integration package structure
- Provides third-party plugin integration support
🐛 Bug Fixes
- YAML Merge Logic Optimization: Fixed type handling issues during configuration merging
- Improved
mergeMissingValuesmethod, using YamlSection instead of ConfigurationSection - Optimized version comparison logic, added
compareVersionsmethod
- Improved
🚀 Improvements & Optimizations
-
YAML File Refactoring:
YamlFiles.javaextensively refactored- Simplified version upgrade logic
- Optimized configuration merging process
- Improved type conversion handling
-
Text Utility Enhancements:
Texts.javaoptimized- Added text blank detection method
- Optimized text processing performance
-
Configuration Version Upgrade:
config.yml: 2.3.0 → 3.0.0lang/zh_CN.yml: 2.3.0 → 3.0.0
-
MessageService Optimization: Refactored message service
- Optimized message sending logic
- Improved text formatting
♻️ Chores & Refactoring
-
Core Service Refactoring: Multiple core service classes refactored and optimized
- Improved service registration and retrieval process
- Optimized service dependency management
-
Dependency Management: Optimized Maven dependency configuration
- Reduced transitive dependency conflicts
- Updated library versions
-
Code Formatting: Unified code style and import formatting
EmakiCorelib 2.3.0
release9 апреля 2026 г.EmakiCoreLib Changelog
[2.3.0] - 2026-04-09
Added
Expression-aware name and lore replacement
ItemRenderServicenow supportsname_append_if_unchangedandname_append_if_changed, which helps strengthen and forge pipelines decide whether another suffix should be appended after a previous name change.- Regex replacement in names and lore now supports capture groups and expression blocks inside the replacement template, making it easier to combine matched text with runtime variables.
ExpressionEngine.replaceVariablesis now exposed as a reusable entry point so name templates, lore templates, and replacement templates share the same variable-expansion behavior.
Startup diagnostics and loader issue collection
- Startup logs now print the list of economy providers that actually became available, so operators can verify
Vaultand other backends more quickly. YamlDirectoryLoadernow accumulates load issues, allowing upper-layer plugins to expose lint, self-check, or admin diagnostics directly.
Improved
Rendering and bridge infrastructure hardening
RegexLoreSearchMatchernow caches compiled regex patterns to reduce repeated compile overhead during frequent lore searches.CacheManagernow tracks hits, misses, evictions, and expirations with atomic counters, which keeps shared cache statistics more stable.- Item source bridges now report more specific details while in
WAITINGorINCOMPATIBLEstate, making load-order and API-compatibility diagnosis easier.
Fixed
ExpressionEnginenow rejects overly long expressions, dangerous characters, andNaN/Infinityresults so broken templates do not poison runtime calculations.- Regex-based rendering no longer flattens replacements too early, so
$1-style capture groups and expression blocks can work together correctly.
Upgrade Notes
- If your name or lore templates already use
$1-style regex capture groups or[ ... ]expression blocks, regression-test those displays after upgrading. - Upper-layer plugins can now read
YamlDirectoryLoader.issues()directly when implementing config self-checks or admin diagnostics. - Startup logs will now print ready economy providers; if an expected backend does not appear, first verify dependency startup order and provider registration.
Known Issues
- None
EmakiCorelib 2.2.0
release8 апреля 2026 г.2.2.0 - 2026-04-08
Overview
This version focuses on fixing the optional dependency loading for EconomyManager, constituting a compatibility and stability update.
Changed
- Adjusted the economy backend registration process.
VaultandCoinsEngineProviders are no longer directly hard-referenced and instantiated during the construction phase. EconomyManagernow checks whether the corresponding plugin is enabled and if the required API classes are visible before deciding whether to register an optional Provider.- The
CoinsEnginerelated Provider has been changed to load reflectively based on runtime state to avoid premature class linking.
Fixed
- Fixed the issue where, when
CoinsEngine / ExcellentEconomyis not installed on the server,EmakiCoreLibwould throw aNoClassDefFoundErrorduring theonEnablephase due to the absence ofsu.nightexpress.excellenteconomy.api.ExcellentEconomyAPI. - Fixed the issue where, despite
CoinsEnginebeing declared insoftdepend, the economy bridge class would still fail at runtime because it was resolved prematurely. - Fixed the issue where CoreLib could not gracefully degrade to a "register only available Providers" state when optional economy dependencies are absent.
Compatibility
- Although the repository for
ExcellentEconomyis namedExcellentEconomy, the server plugin registration name and build artifact identifier still useCoinsEngine. - The existing
softdepend: CoinsEngineconfiguration remains correct; no need to change it toExcellentEconomy. - Existing syntax in action DSL such as
provider=vault,provider=coinsengine, andcurrency=...remains compatible.
Migration
- No configuration migration is required.
- No data migration is required.
- No command, permission, or language file adjustments are needed.
EmakiCorelib 2.1.0
release7 апреля 2026 г.[2.1.0] - 2026-04-08
Added
Unified Item Source Bridge and Dependency Integration Timing
- Added
ItemSourceIntegrationCoordinator. During the startup phase, it uniformly registers item source resolvers forMMOItems,ItemsAdder,Nexo,NeigeItems, andCraftEngine. - Item source bridges now dynamically switch between
READY,WAITING, andINCOMPATIBLEstates based on external plugin enable/disable events and the official "item registration complete" event. - Added bridge status logs to the console, clearly distinguishing scenarios like "plugin not installed", "installed but resources not yet loaded", and "API version incompatible".
plugin.ymlhas been updated with relevant soft-dependencies. Upper-layer plugins no longer need to individually manage the loading sequence of external item plugins.
Action System - New Temporary Item Workflow
ActionContextnow has shared state across actions, facilitating the reuse of temporary data within the same action chain.- Added built-in actions:
createitem,edititem,senditem,clearitem. These allow directly creating items, modifying name/Lore, giving items to players, and clearing items by slot within the action DSL. - The temporary item workflow is now integrated with the unified
ItemSourceServiceandItemPresentationEditor, allowing direct item generation from item sources with presentation modifications applied. clearitemsupports dual filtering by slot and item source, suitable for reuse in chains like forging, strengthening, and reward recovery.
Expanded Foundation for Presentation Compilation and Document Editing
- Added
ItemPresentationEditor, supporting standardized editing of name and Lore for existingItemStacks at runtime. YamlDirectoryLoadernow retains the originalYamlConfiguration, source file path, and parsing results, facilitating editor implementation, backups, and hot-reloading for upper-layer plugins.- Added
ConditionEvaluator, a universal condition parser supporting numerical comparison, string comparison, and&&/||combination logic, providing a common foundation for configuration filtering and rule judgment in upper-layer plugins.
Improvements & Optimizations
Standardization of Item Presentation Protocol
EmakiPresentationEntry,SearchInsertConfig, andLoreSearchInsertResulthave been unified into a standardized field structure, reducing ambiguity during serialization and data backfilling in the presentation layer.- The presentation compiler now only accepts standardized operation and field names. Validation, return status, and error details for Lore search-and-insert are also more explicit.
- The collaboration between
ItemRenderServiceand the assembly of presentation entries has been further consolidated, making it easier for upper-layer modules likeEmakiForgeandEmakiStrengthento reuse directly.
Action Execution Precision and Reusability
@chancenow uses high-precision threshold parsing, reducing floating-point probability boundary errors.- Shared state eliminates the dependency on external global containers for multi-step item processing within the same action chain.
ItemSourceTypehas been expanded with more complete type display names and alias resolution, unifying format recognition for sources likeItemsAdder/Nexo.
Upgrade Notes
EmakiForge 2.1.0andEmakiStrengthen 1.0.0are advised to uniformly depend on CoreLib'sItemSourceServiceand should no longer maintain external item bridges within their respective business modules.- If your action configurations still use
givecoins, please migrate before upgrading; this built-in action has been removed from the default registration list. - If your presentation configurations rely on old alias keys or field names, please revert to the standard写法 during upgrade, e.g.,
action,content,target_pattern,regex_pattern,replacement. - After the server integrates
ItemsAdder,Nexo,NeigeItems,CraftEngine, orMMOItems, it is recommended to verify in the startup logs that the final bridge status isREADY.
Known Issues
- None
