|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## [1.1.0] - 2026-03-21 |
| 11 | + |
| 12 | +### Added |
| 13 | + |
| 14 | +- **`SessionSequence`** — Manages an ordered progression of `SequenceSession` subclasses for a single player. |
| 15 | + Supports `start()`, `startFrom()` (by 0-based index or class-string), `onComplete()` callback, and `terminateAll()`. |
| 16 | +- **`SequenceSession`** — Abstract base class extending `Session` for use within a `SessionSequence`. |
| 17 | + Provides `next()` to advance the sequence to the next step or invoke the `onComplete` callback on the last step. |
| 18 | +- **`SequenceSessionManager`** — Internal `SessionManager` subclass that supports sequential progression |
| 19 | + via `setNext()`, `setOnExhausted()`, and `progressNext()`. |
| 20 | +- **`SessionManager::getSessionOrThrow()`** — Retrieves the active session or throws `RuntimeException` if none exists. |
| 21 | +- **`SessionManager::getOrCreateSession()`** — Retrieves the active session or creates one if none exists. |
| 22 | +- **`SessionManager::onSessionCreated()`** — Registers a callback invoked after a session is created and started. |
| 23 | +- **`SessionManager::onSessionTerminated()`** — Registers a callback invoked after a session is terminated and removed. |
| 24 | +- **`ManagerMethodDispatcher`** — New `BaseSessionEventDispatcher` subclass that invokes a method directly on |
| 25 | + a `SessionManager` instance. Used internally for lifecycle event handling. |
| 26 | + |
| 27 | +### Changed |
| 28 | + |
| 29 | +- **`Session`** — The `Session` interface and `AbstractSession` class have been merged into a single |
| 30 | + `Session` abstract class. `SessionManager` reference is now held by `Session` directly, |
| 31 | + enabling self-termination via `terminate()` without external manager access. |
| 32 | +- **`SessionEventDispatcher`** — Renamed to `BaseSessionEventDispatcher` and converted to an abstract class. |
| 33 | + The concrete session method dispatch logic has been extracted into `SessionMethodDispatcher`. |
| 34 | +- **`SessionManager`** — Lifecycle event handling (`PlayerJoinEvent`, `PlayerQuitEvent`) is now routed through |
| 35 | + `SessionEventListenerRegistry` via `ManagerMethodDispatcher`, eliminating duplicate PMMP listener |
| 36 | + registration across multiple managers for the same event. |
| 37 | +- **`SessionManager`** construction steps have been split into `collectSessionLifecycleBindings()` and |
| 38 | + `collectSessionEventBindings()` for clearer separation of concerns. |
| 39 | + |
| 40 | +### Fixed |
| 41 | + |
| 42 | +- **`SessionManager::removeSession()`** — Fixed a re-entry issue where `Session::terminate()` calling back |
| 43 | + into `removeSession()` could cause double-removal. Sessions are now unregistered from the internal map |
| 44 | + before `terminate()` is invoked. |
0 commit comments