Skip to content

Latest commit

 

History

History
628 lines (509 loc) · 26 KB

File metadata and controls

628 lines (509 loc) · 26 KB

EasyLibrary 2.0.0

Released June 16, 2026

For PocketMine-MP API 5.0.0+ and PHP 8.2+

EasyLibrary 2.0.0 is a major architectural release for PocketMine-MP 5 and PHP 8.2+. It replaces the old bundled vendor copies and duplicate component APIs with standalone-compatible ImperaZim libraries, introduces a runtime module system, and narrows legacy lifecycle-managed components to the parts that still require embedded plugin management.

This release contains breaking namespace and behavior changes. Plugins written for EasyLibrary 1.3 must be migrated explicitly.

What changed from 1.3 to 2.0

EasyLibrary 2.0 is not just an incremental update; it is a rearchitecting of the library distribution and runtime behavior.

  • 1.3: embedded copies of third-party libraries under imperazim\vendor\*.
  • 2.0: standalone-compatible namespaces such as imperazim\command, imperazim\form, imperazim\window, imperazim\packet, imperazim\trigger, imperazim\custom, imperazim\placeholder, and imperazim\world.
  • 1.3: larger legacy component loader with many plugin lifecycle-managed components.
  • 2.0: only Cache remains as a lifecycle-managed legacy component.
  • 1.3: limited ability to break plugins into runtime modules.
  • 2.0: full runtime module system with manifest discovery, dependencies, services, capabilities, reload, refresh, health checks, and diagnostics.
  • 1.3: embedded fallback behavior was ad-hoc.
  • 2.0: explicit standalone-first fallback handling for placeholder, command, HUD, trigger, and world managers.

Highlights

  • Added twelve maintained library namespaces that can be consumed from EasyLibrary or used as standalone plugins.
  • Added a complete runtime module system with manifests, dependencies, services, capabilities, lifecycle cleanup, diagnostics, and examples.
  • Removed the old imperazim\vendor\* tree and duplicate legacy APIs.
  • Added standalone-aware fallback bootstrap behavior for placeholder, command, HUD, trigger, and world systems.
  • Added safer legacy component configuration and shutdown handling.
  • Updated the EasyLibrary plugin version to 2.0.0.

Standalone Release References

EasyLibrary 2.0.0 is the core bundle, but each extracted library also has its own standalone repository, detailed changelog, release assets, quality workflow and stable branch. Use this table when you need the deeper implementation notes for a specific namespace or when a plugin depends on one standalone library instead of the whole EasyLibrary bundle.

Project Version Role in this release Changelog Release
LibCommand 2.0.0 Typed command framework, subcommands, arguments, constraints and Bedrock command data rebuilding. Changelog v2.0.0
LibForm 2.0.0 Bedrock form builders, class-based forms, validation, chains, history and async form flows. Changelog v2.0.0
LibHud 2.0.0 Boss bars, scoreboards, titles, action bars, nametags, tab lists and composed HUD updates. Changelog v2.0.0
LibDB 2.0.0 SQLite/MySQL access, query builders, transactions, models, migrations, seeders and cache helpers. Changelog v2.0.0
LibSerializer 2.0.0 Item, block, entity, skin, inventory, position, location, schematic and compact data serialization. Changelog v2.0.0
LibTrigger 2.0.0 Global, per-player and item-aware trigger scheduling with ownership, tags and transition modes. Changelog v2.0.0
LibWindow 2.0.0 Fake inventory windows, window sessions, layouts, transaction handling and Bedrock container transport. Changelog v2.0.0
LibPacket 2.0.0 Packet interception, monitoring, filtering, rewriting, profiling, logging and packet test utilities. Changelog v2.0.0
LibCustom 2.0.0 Custom item, block and entity registration with Bedrock components, palettes and runtime sync. Changelog v2.0.0
LibEnchantment 2.0.0 Custom enchantment registration, reactive/ticking/toggleable behavior, presets and display formatting. Changelog v2.0.0
LibPlaceholder 1.0.0 Placeholder parsing, built-in packages, third-party expansions, external packages and /papi tools. Changelog v1.0.0
LibWorld 1.0.0 World lifecycle, regions, selections, edit operations, templates, instances, schematics and portals. Changelog v1.0.0

Adjacent ecosystem projects released with the same stable wave:

Project Version Purpose Changelog Release
EasyLibraryAgent 1.0.0 External sidecar for network registry, PubSub, KV, locks, RPC, flags and safe compute services. Changelog v1.0.0
EasyLibraryAgentBridge 1.0.0 Standalone PMMP bridge for Agent APIs, events, placeholders and diagnostics. Changelog v1.0.0
LibPlaceholderIndex 1.0.0 Reviewed catalog consumed by /papi expansions for verified external package downloads. Changelog v1.0.0
LibPlaceholderExpansions 1.0.1 Official source and package build repository for reviewed LibPlaceholder expansion PHARs. Changelog v1.0.1

Added

Standalone-compatible libraries

EasyLibrary 2.0 introduces first-class support for standalone libraries while still allowing EasyLibrary to host embedded fallback implementations.

imperazim\placeholder

  • %identifier_parameters% placeholder syntax.
  • %rel_identifier_parameters% relational syntax with two-player context.
  • Java-style setPlaceholders() and setRelationalPlaceholders() aliases.
  • Built-in player, server, and context expansion packages.
  • Closure and class-based third-party expansions.
  • Closure and class-based relational expansions.
  • Optional player and caller-provided context.
  • Recursive parsing with max pass count and cycle detection.
  • Escaped literal tokens with \%placeholder%.
  • Owner-aware registrations and automatic cleanup.
  • Safe fallback behavior when expansions fail.
  • LibCommand-backed /papi route with parsing, relational parsing, broadcast, command execution, expansion inspection, and diagnostics.
  • Persistent external expansion inventory with manifest validation, SHA-256 verification, package state, and installed/downloads/cache/data directories.
  • Startup-only external PHAR loader with package lifecycle, compatibility and plugin dependency checks, isolated registration, rollback, runtime states, and restart-safe enable/disable controls.
  • Expansion Index integration with cached catalog browsing, asynchronous GitHub downloads, exact size and SHA-256 verification, and compatible release selection.
  • Nested /papi expansions commands for status, refresh, list, search, info, download, update, remove, and verification.
  • Restart-safe pending installation and removal for external packages that are already active in memory.

imperazim\world

  • Safe world creation, loading, unloading, cloning, renaming, deletion, backup, and restoration.
  • Reusable world templates and disposable match instances.
  • Cuboid, cylinder, sphere, ellipsoid, polygon, and pyramid regions.
  • Region priorities, flags, ownership, and player enter/leave events.
  • Per-player selections.
  • TPS-aware tick-budgeted block operations.
  • Composable patterns and masks.
  • Clipboard rotation, schematics, brushes, portals, copy, cut, paste, stack, move, undo, and redo.
  • Fluent EditSession API and standalone /libworld tools.

imperazim\packet

  • Packet handlers and handler chains.
  • Incoming and outgoing interception.
  • Packet monitors, filtering, recording, and analysis.
  • Network profiling, throttling, logging, statistics, validation, and cloning.
  • Mock sessions and packet testing helpers.

imperazim\command

  • Class-based and dynamic commands.
  • Subcommands and typed arguments.
  • Boolean, enum, float, integer, item, player, position, range, string, target, and world arguments.
  • Permission, cooldown, game mode, rate limit, console, player, and world constraints.
  • Structured command results and failures.
  • Command groups, history, macros, scheduling, help generation, permission trees, and interactive command wizards.
  • Bedrock command data interception and overload rebuilding.

imperazim\form

  • Long, modal, and custom forms.
  • Class-based forms and fluent builders.
  • Dynamic and paginated button forms.
  • Conditional fields and validated inputs.
  • Searchable dropdowns and option normalization.
  • Form chains, history, timeouts, presets, and asynchronous loading.
  • Shared FormData and explicit FormResult flow control.

imperazim\hud

  • Boss bars, animated bars, named bar pools, and scoreboard templates.
  • Titles, action bars, toasts, notifications, and nametags.
  • Tab list headers and footers.
  • Cooldown displays and layered HUD composition.
  • Optional placeholder parsing in HUD templates.

imperazim\db

  • Shared database interface.
  • SQLite and MySQL drivers.
  • Prepared statements and transaction support.
  • Fluent query builder.
  • Active Record models and model queries.
  • Schema migrations and seeders.
  • TTL cache layer with invalidation.
  • Asynchronous query tasks.

imperazim\serializer

  • Serialization for items, blocks, entities, skins, inventories, armor, and enchantments.
  • Vector, position, and location serialization.
  • Chest and container data serialization.
  • Batch helpers and compact compressed formats.
  • Versioned data migration.
  • Schematic capture, storage, rotation, and paste support.

imperazim\trigger

  • Global and per-player triggers.
  • Item-aware triggers and repeating conditions.
  • Continuous, one-shot, and state-change modes.
  • Individual intervals and priorities.
  • Owner-aware registration, tags, and named lookup.
  • Central lifecycle and diagnostics.

imperazim\window

  • Chest, double chest, hopper, barrel, furnace, blast furnace, smoker, and brewing stand windows.
  • Dynamic window builder and inventory layouts.
  • Per-player sessions, transaction handling, and deferred sends.
  • Graphic translators, window type registry, and presets.

imperazim\enchantment

  • Custom enchantment registration and lookup.
  • Reactive, ticking, and toggleable enchantment types.
  • Armor, weapon, projectile, effect, debuff, and damage presets.
  • Display formatting and projectile tracking.
  • Tick and cleanup stabilization.

imperazim\custom

  • Custom block, item, and entity factories.
  • Block palette registration and property definition.
  • Material, geometry, collision, lighting, friction, mining, explosion, and flammability components.
  • Item components for food, durability, cooldowns, projectiles, wearables, repair, display, lore, tags, interaction, and Bedrock properties.
  • Asynchronous registration and tick tasks.

Runtime module system

Added imperazim\module:

  • Module discovery through module.yml and module.yaml.
  • Plugin module sources declared through easylibrary-modules.
  • BaseModule, ModuleContext, ModuleManager, and public module APIs.
  • Hard and optional module dependencies.
  • Version constraints for module dependencies.
  • Plugin dependencies for PocketMine plugins.
  • Service and capability dependencies.
  • Preferred capability providers.
  • Load ordering and dependency graph validation.
  • Persistent and runtime-only disable states.
  • Module reload and source refresh.
  • Per-module configuration and data directories.
  • Per-module logging and debug state.
  • Health checks and failure reporting.
  • Tracked commands, listeners, event callbacks, scheduled tasks, async jobs, components, services, APIs, and cleanup callbacks.
  • Automatic dependent shutdown when required dependencies disappear.
  • Runtime reactions to plugin enable/disable events.
  • Module lifecycle events for discovery, enable, disable, reload, dependency, and service registration.

Added /easymodule with aliases /emodule and /modules.

Supported actions:

  • list
  • info
  • why
  • resources
  • health
  • failures
  • services
  • capabilities
  • provider
  • enable
  • disable
  • disable-runtime
  • reload
  • refresh
  • doctor
  • graph
  • dependents
  • debug

Added complete example plugins for:

  • a basic module.
  • a cross-plugin economy service provider.
  • a farm consumer module using services and capabilities.
  • dependency and service failure diagnostics.

Utility components

Added or expanded utility APIs under imperazim\components:

  • CameraAPI
  • CombatTag
  • Cooldown
  • DataStore
  • EventBus
  • AsyncHTTP and HTTPResponse
  • I18n
  • PluginChannel
  • Metrics
  • ParticleEffect
  • ConfigManager
  • ExceptionHandler
  • TaskSchedulerAPI
  • SoundManager
  • Cache, filesystem, item, UI, text, time, number, array, HTTP, and validation helpers.

Changed

Architecture

  • Changed EasyLibrary from a bundle of embedded vendor projects into a distribution of maintained standalone-compatible libraries.
  • Renamed public namespaces to match standalone package names.
  • Added optional dependencies for standalone libraries.
  • Added LibraryModules to initialize embedded fallback managers when no standalone plugin is present.
  • Added explicit shutdown handling for embedded placeholder, trigger, and world hosts.
  • Added runtime handoff between standalone and embedded implementations.
  • Standalone libraries remain active hosts when installed.
  • Added embedded registration of /libworld and /lw while EasyLibrary owns the LibWorld runtime.
  • Added command ownership handoff through LibWorldCommandRegistry to prevent duplicate standalone and embedded command routes.
  • Added command ownership handoff through PlaceholderCommandRegistry so /papi, /placeholder, and /ph follow the active placeholder host.
  • Added hierarchical LibWorld command groups backed by concrete LibCommand subcommand classes in separate files.
  • Added domain permissions for world, selection, edit, clipboard, schematic, history, and operation commands.

Component loader

  • Reduced lifecycle-managed legacy components to Cache.
  • Replaced imperazim\components\world with the standalone-compatible imperazim\world library.
  • Added safe handling for invalid components.yml entries.
  • Non-boolean values are now disabled and reported instead of failing startup.
  • Removed or unknown component names are disabled and reported.
  • Component startup failures disable only the failing component.
  • Components are disabled in reverse activation order.
  • Added commands.overwrite_defaults to replace PocketMine's /plugins and /version commands when desired.

Toolkit and utilities

  • Expanded File and Path filesystem capabilities.
  • Expanded cache operations and compatibility aliases.
  • Expanded array, text, number, validation, world, and item utilities.
  • Added safer component and command registration behavior to PluginToolkit.
  • Updated database contracts to use a shared interface.
  • Updated custom block palette generation and registration behavior.
  • Improved window lifecycle and transaction stability.

Fixed

  • Fixed reactive enchantments accessing player inventory before a player was fully initialized during login.
  • Reactive enchantments now ignore early lifecycle events and reuse safely initialized inventory objects.
  • Fixed stale legacy component configuration preventing startup.
  • Fixed embedded manager fallback and shutdown behavior.
  • Fixed custom block palette synchronization.
  • Fixed database interface implementation consistency.
  • Fixed multiple window send, transaction, and cleanup edge cases.

Removed

Removed vendor namespaces

Removed the entire imperazim\vendor\* tree:

  • imperazim\vendor\commando
  • imperazim\vendor\customies
  • imperazim\vendor\invmenu
  • imperazim\vendor\libform
  • imperazim\vendor\simplepackethandler

Use the new maintained namespaces instead:

Removed Replacement
imperazim\vendor\commando imperazim\command
imperazim\vendor\customies imperazim\custom and imperazim\enchantment
imperazim\vendor\invmenu imperazim\window
imperazim\vendor\libform imperazim\form
imperazim\vendor\simplepackethandler imperazim\packet

Removed duplicate component APIs

Removed obsolete runtime implementations from:

  • imperazim\components\command
  • imperazim\components\database
  • imperazim\components\hud
  • imperazim\components\serialization
  • imperazim\components\trigger
  • imperazim\components\ui

Use:

  • imperazim\command
  • imperazim\db
  • imperazim\hud
  • imperazim\serializer
  • imperazim\trigger
  • imperazim\form

Removed legacy runtime features

  • Removed BugFixesManager and BugFixesListener.
  • Removed the old /genplugin command and its unused permission.
  • Removed legacy component toggles for BossBar, InvMenu, Command, Triggers, BugFixes, Commando, Customies, and CustomiesEnchantment.
  • Removed bundled third-party Customies and InvMenu source copies.

Migration guide

Namespace migration example

// 1.3
use imperazim\vendor\commando\Command;
use imperazim\vendor\invmenu\InvMenu;
use imperazim\vendor\libform\types\LongForm;

// 2.0
use imperazim\command\Command;
use imperazim\window\Window;
use imperazim\form\long\LongForm;

Component configuration migration

In 1.3, components.yml could contain many lifecycle-managed entries. In 2.0, only the following entry remains supported:

vendor:
  Cache: true

Unsupported or invalid entries are now disabled safely and reported during startup. Remove vendor.World and migrate world APIs to imperazim\world.

Module system migration example

# plugin.yml
depend:
  - EasyLibrary

easylibrary-modules:
  - path: modules
    namespace: vendor\plugin\modules
# modules/farm/module.yml
id: vendor:farm
name: Farm System
version: 1.0.0
loader: FarmModule
namespace: vendor\plugin\modules\farm
load: POSTWORLD
enabled: true

provides:
  services:
    - vendor:farm-service
  capabilities:
    - economy
requires:
  services:
    - examples:economy-service
  capabilities:
    - economy

Command registration changes

The new command framework is safer and more declarative. The old component registration pattern is replaced by imperazim\command builders and explicit command classes.

Standalone fallback behavior

2.0 prefers standalone host plugins when installed, while still providing embedded fallback support:

  • Standalone LibPlaceholder, LibWorld, LibCommand, LibHud, and LibTrigger are preferred.
  • EasyLibrary hosts embedded fallback only when needed.
  • Runtime ownership is transferred cleanly between standalone and embedded hosts.
  • The LibWorld command route follows the active host and preserves nested autocomplete in both distributions.

Compatibility

  • PocketMine-MP API 5.0.0+
  • PHP 8.2+
  • EasyLibrary 1.3 plugins may require namespace, lifecycle, and API changes.

Final Stable Notes

Release Focus

EasyLibrary 2.0.0 is the core distribution release for the ImperaZim library ecosystem. It turns EasyLibrary into a stable host for the standalone Lib* projects while keeping embedded fallbacks available for servers that prefer one plugin instead of many PHARs.

The release also formalizes the split between the core library bundle and optional network services. EasyLibrary no longer behaves as if the Agent Bridge is always part of the runtime. The embedded Agent Bridge stays available, but it is disabled whenever the standalone EasyLibraryAgentBridge plugin is loaded.

Added

  • Added the 2.0.0 embedded library set under the public imperazim\* namespaces:
    • imperazim\command for typed commands and subcommands.
    • imperazim\form for Bedrock forms and form builders.
    • imperazim\hud for boss bars, scoreboards, titles and nametags.
    • imperazim\db for SQL drivers, query builders, models and migrations.
    • imperazim\serializer for PocketMine object serialization.
    • imperazim\trigger for scheduled trigger evaluation.
    • imperazim\window for fake inventory windows.
    • imperazim\packet for packet interception and monitoring.
    • imperazim\custom for custom items, blocks and entities.
    • imperazim\enchantment for custom enchantment behavior.
    • imperazim\placeholder for placeholder parsing and expansions.
    • imperazim\world for worlds, regions, selections and edit operations.
  • Added runtime host handoff for embedded LibPlaceholder and LibWorld. EasyLibrary can initialize the embedded copy when no standalone plugin exists, then transfer the host to the standalone plugin if it is enabled later.
  • Added optional EasyLibraryAgentBridge soft dependency so the standalone bridge can load before EasyLibrary and take priority.
  • Added dynamic runtime permission registration for embedded command surfaces. This keeps embedded commands permission-protected without declaring standalone library permissions in EasyLibrary's plugin.yml.
  • Added release documentation, governance files, quality workflow coverage and synchronized repository metadata for the 2.0 library family.

Changed

  • Changed EasyLibrary from a monolithic helper collection into a distribution layer for standalone-compatible libraries. Plugin developers should import the same namespaces whether they depend on a standalone lib or on EasyLibrary.
  • Changed Agent Bridge detection so the standalone bridge has priority over the embedded fallback. This prevents duplicate runtimes and keeps the Agent lifecycle easier to reason about.
  • Changed embedded command registration for LibPlaceholder and LibWorld to happen only when their embedded managers are actually initialized.
  • Changed repository synchronization workflows so standalone library updates can be pushed into the embedded EasyLibrary source without losing concurrent sync commits.
  • Changed the default release posture: optional systems are opt-in, and the core plugin can boot without Agent services, external databases or optional standalone libraries.

Fixed

  • Fixed server boot when EasyLibrary is installed together with standalone LibPlaceholder and LibWorld. EasyLibrary no longer declares libplaceholder.* or libworld.* permissions in its manifest, avoiding PocketMine's duplicate permission load error.
  • Fixed embedded Agent Bridge fallback logic so it is disabled when the standalone EasyLibraryAgentBridge plugin is installed and enabled.
  • Fixed quality analysis around embedded Agent Bridge code by syncing the standalone bridge source and updating PHPStan stubs.
  • Fixed sync workflow race conditions by rebasing and retrying pushes to development.
  • Fixed the local all-plugin boot scenario: EasyLibrary, the standalone libs and EasyLibraryAgentBridge now load together and reach the PocketMine Done state.

Compatibility Notes

  • Requires PocketMine-MP API 5.0.0+.
  • Requires PHP 8.2+.
  • Standalone libraries are preferred when installed. EasyLibrary only starts embedded fallbacks for systems that are missing as standalone plugins.
  • EasyLibraryAgentBridge is optional. When installed, EasyLibrary disables the embedded Agent Bridge and uses the standalone bridge as the runtime owner.
  • Existing plugins should import public library namespaces directly, for example imperazim\form, imperazim\command, imperazim\placeholder and imperazim\world.

Migration Notes

  • If your plugin requires the complete EasyLibrary bundle, keep:
depend:
  - EasyLibrary
  • If your plugin can run against either a standalone lib or the embedded EasyLibrary copy, use soft dependencies:
softdepend:
  - LibPlaceholder
  - LibWorld
  - EasyLibrary
  • Do not depend on EasyLibrary's old monolithic Agent API. Use the split Agent namespaces when the Agent Bridge is available:
use imperazim\agent\api\AgentRuntimeAPI;
use imperazim\agent\api\AgentFlagsAPI;
use imperazim\agent\constant\AgentNetworkFlags;

if (!AgentRuntimeAPI::isAvailable()) {
    return;
}

AgentFlagsAPI::set(AgentNetworkFlags::MAINTENANCE, true, 300, 'Restarting');

Example

use imperazim\placeholder\PlaceholderAPI;
use imperazim\world\WorldAPI;

$text = PlaceholderAPI::parse('Players: %server_online%', $player);

if (WorldAPI::isAvailable()) {
    WorldAPI::worlds()->load('arena');
}