Feat/actionbar#391
Conversation
…ence - implement sendActionbar function to display messages for a specified duration - create ActionbarService to manage actionbar jobs and cancellation - add StableActionbarTestCommand for testing actionbar functionality - update CoreInstance to cancel all actionbars on disable - bump version to 3.31.0 in gradle.properties
- introduce onCount callback for each actionbar sent - add onFinish callback for when actionbar display ends - enhance sendActionbar function to support new parameters
- implement cancel method to allow cancellation of specific actionbar jobs by jobId - enhance cancelAll method to remove jobs from actionbars
There was a problem hiding this comment.
Pull request overview
Adds a core-level “stable actionbar” facility that repeatedly sends actionbar content over a duration using coroutines, plus a Paper plugin-test command to exercise it. This fits into the shared/core messaging utilities and ensures actionbar jobs are cleaned up during shutdown.
Changes:
- Introduces
ActionbarServiceandAudience.sendActionbar(...)extensions to schedule repeated actionbar updates. - Adds a
stableActionbarTestsubcommand for manual verification in the Paper plugin-test module. - Cancels all running actionbar jobs during
CoreInstanceshutdown and bumps the project version.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| surf-api-paper/surf-api-paper-plugin-test/src/main/kotlin/dev/slne/surf/surfapi/bukkit/test/command/subcommands/StableActionbarTestCommand.kt | Adds a test subcommand that sends an updating actionbar for a fixed duration. |
| surf-api-paper/surf-api-paper-plugin-test/src/main/java/dev/slne/surf/api/paper/test/command/SurfApiTestCommand.java | Registers the new stableActionbarTest subcommand and expands imports. |
| surf-api-core/surf-api-core/src/main/kotlin/dev/slne/surf/api/core/actionbar/ActionbarService.kt | Adds the coroutine-based job tracker and sender for stable actionbars. |
| surf-api-core/surf-api-core/src/main/kotlin/dev/slne/surf/api/core/actionbar/actionbar-util.kt | Adds Audience.sendActionbar extension entrypoints with KDoc. |
| surf-api-core/surf-api-core-server/src/main/kotlin/dev/slne/surf/api/core/server/CoreInstance.kt | Ensures actionbar jobs are cancelled on core disable. |
| gradle.properties | Bumps version from 3.30.0 to 3.31.0. |
|
This PR contains changes that modified the public API. To update the reference ABI dumps: ./gradlew updateKotlinAbi
git add **/api/**
git commit -m "Update ABI reference"
git pushAfter updating, the CI will pass. Make sure the changes are backward compatible. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
This PR contains changes that modified the public API. To update the reference ABI dumps: ./gradlew updateKotlinAbi
git add **/api/**
git commit -m "Update ABI reference"
git pushAfter updating, the CI will pass. Make sure the changes are backward compatible. |
2 similar comments
|
This PR contains changes that modified the public API. To update the reference ABI dumps: ./gradlew updateKotlinAbi
git add **/api/**
git commit -m "Update ABI reference"
git pushAfter updating, the CI will pass. Make sure the changes are backward compatible. |
|
This PR contains changes that modified the public API. To update the reference ABI dumps: ./gradlew updateKotlinAbi
git add **/api/**
git commit -m "Update ABI reference"
git pushAfter updating, the CI will pass. Make sure the changes are backward compatible. |
No description provided.