Skip to content

Fix #2919: extra blank line in confirmation conversation prompts#2927

Merged
tastybento merged 1 commit intodevelopfrom
fix/2919-prompt-blank-line
Apr 8, 2026
Merged

Fix #2919: extra blank line in confirmation conversation prompts#2927
tastybento merged 1 commit intodevelopfrom
fix/2919-prompt-blank-line

Conversation

@tastybento
Copy link
Copy Markdown
Member

@tastybento tastybento commented Apr 8, 2026

Summary

  • Fixes Extra space #2919 — confirmation conversation prompts (e.g. /ob settings → Reset to default) printed an extra blank line above the prompt text.
  • Cause: commit 515a7f1 worked around a (seemingly) broken Player.sendRawMessage formatting path by sending the prompt via User.sendRawMessage and returning "" from getPromptText. Bukkit's Conversation API still prints whatever getPromptText returns, so the empty string became a blank chat line.
  • Verified in-game on current Paper that returning the legacy §-coded translation directly from getPromptText renders correctly, so the workaround is no longer needed. Reverts the prompt-rendering portion of 515a7f1 across all 9 prompt classes (ConfirmPrompt, admin/blueprint NamePrompt, InviteNamePrompt, blueprint Commands/Description/Name(Success)Prompt) and restores the matching test assertions in IslandTeamInviteGUITest and CommandsPromptTest.
  • The unrelated PanelItemBuilder multi-line name change from 515a7f1 is not touched.

Test plan

  • ./gradlew test --tests "*ConfirmPrompt*" --tests "*IslandTeamInviteGUITest*" --tests "*CommandsPromptTest*" --tests "*NamePrompt*" — green
  • In-game: /ob settings → Reset to default — prompt renders with colors and no blank line (confirmed by reporter scenario)
  • In-game: /island team invite name entry prompt
  • In-game: /island renamehome prompt
  • In-game: /bbox blueprint admin name / description / commands edit flows (the most format-heavy prompts)

Conversation prompts were sending their text via User.sendRawMessage and
returning "" from getPromptText, which caused Bukkit's Conversation API
to print an empty line after the actual prompt. Return the legacy-coded
translation directly instead — Paper renders § codes correctly through
sendRawMessage, so the original workaround is no longer needed.

Reverts the prompt-rendering portion of 515a7f1 across all 9 prompt
classes (ConfirmPrompt, admin/blueprint NamePrompt, InviteNamePrompt,
Commands/Description/Name(Success)Prompt) and restores the matching
test assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

@tastybento tastybento merged commit 7bc6b73 into develop Apr 8, 2026
3 checks passed
@tastybento tastybento deleted the fix/2919-prompt-blank-line branch April 8, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extra space

1 participant