github DMedina559/bedrock-server-manager 3.10.6

2 hours ago

Note

Paving the way for Async: This release introduces support for async plugins and task loops! This is the first step toward the fully asynchronous refactor starting in the next major version. This will significantly improve performance and keep the main thread responsive without relying on heavy OS threads.

What's New:

Plugin Refactors:

The plugin architecture has been heavily refined to be more intuitive, safer, and feature-rich:

  • New Event System & @app_event Decorator: Event registration has been vastly cleaned up. You can now use the new @app_event decorator for a much more streamlined way to register app/custom events, replacing the legacy methods (e.g def before_server_stop(...)) with the new decorator (e.g @app_event("before_server_start"))

  • Async Plugin Support: Plugins now officially support async event methods, allowing you to perform non-blocking operations directly in your event hooks. This is the first step towards a full asynchronous refactor.

  • Cancellable Events (event.cancel(...)): Core operations can now be intercepted and cancelled by plugins. The new CancellableEvent object is injected into before hooks. Calling event.cancel(reason) will short-circuit the core operation and return a cancellation payload. This is useful for scenarios where you want to cancel a start if a backup or update fails etc, etc.

  • Periodic Background Tasks (@task_loop): Plugins can now safely run periodic tasks. Using the lightweight @task_loop(interval_in_seconds) decorator on a plugin method will automatically schedule and run it, with the PluginManager seamlessly handling startup and safe cancellation during unload.

  • Topological Dependency Loading: The PluginManager now handles topological sorting of plugins. You can define dependencies and optional_dependencies in your plugin attributes, ensuring they load in the correct order.

  • Event Identity Keys & Re-entrancy Refactor: A runtime _event_registry is now used for per-event identity keys, preventing infinite loops during event dispatches, removing the need for hardcoded app events.

  • Auto-Generated Event Documentation: The api_docs_generator plugin has been extended to automatically generate markdown documentation for all available plugin events in the current app installation.

What's Changed

🚀 Features

💄 Style & Refactoring

⬆️ Dependencies

  • dep: update httpx2 requirement from <2.11,>=2.5.0 to >=2.5.0,<2.13 by @dependabot[bot] in #395
  • dep: update mcstatus requirement from <14.1,>=12.0 to >=12.0,<14.2 by @dependabot[bot] in #393
  • dep: update click requirement from <8.5,>=8.2.0 to >=8.2.0,<8.6 by @dependabot[bot] in #398
  • dep: update isort requirement from <8.1,>=5.13.0 to >=5.13.0,<9.1 by @dependabot[bot] in #399

Full Changelog: 3.10.5...3.10.6

Don't miss a new bedrock-server-manager release

NewReleases is sending notifications on new releases.