Feat/disconnect message#359
Conversation
- implement buildDisconnectComponent function for customizable disconnect messages - support parameters for reason, details, issue footer, retry footer, and Discord link
|
👋 TheBjoRedCraft your PR is conflicting and needs to be updated to be merged |
There was a problem hiding this comment.
Pull request overview
Adds a new helper in surf-api-core to build structured disconnect/kick-style messages via the SurfComponentBuilder DSL, and bumps the project version for release.
Changes:
- Added
CommonComponents.buildDisconnectComponent(...)for composing disconnect messages with configurable details and optional footers. - Switched
CommonComponents.ktadventure imports todev.slne.surf.api.core.messages.adventure.*. - Bumped
versionfrom3.13.0to3.13.1.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| surf-api-core/surf-api-core/src/main/kotlin/dev/slne/surf/api/core/messages/CommonComponents.kt | Introduces the new disconnect component builder helper and adjusts related imports. |
| gradle.properties | Increments the project version to 3.13.1. |
| appendNewline(2) | ||
| error(reason) | ||
| appendNewline(3) | ||
| append(details).color(SPACER) |
| if (issue) { | ||
| append(ISSUE_FOOTER) | ||
| } | ||
|
|
||
| if (retryLater) { | ||
| append(RETRY_LATER_FOOTER) | ||
| } | ||
|
|
||
| if (onlyDiscordLink) { | ||
| appendNewline(2) | ||
| primary("discord.gg/castcrafter") | ||
| } |
| appendNewline(2) | ||
| primary("CASTCRAFTER") | ||
| appendNewline() | ||
| primary("COMMUNITY SERVER") | ||
| appendNewline(2) |
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. |
1 similar comment
|
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.