Skip to content

Ask for input with BentoBox prompts instead of Bukkit conversations - #467

Merged
tastybento merged 1 commit into
developfrom
feat/prompts-api
Nov 23, 2026
Merged

tastybento merged 1 commit into
developfrom
feat/prompts-api

Conversation

@tastybento

Copy link
Copy Markdown
Member

Why

Paper has marked org.bukkit.conversations as deprecated for removal. This addon used it, through ConversationUtils, every time it asked a player to type something.

What

ConversationUtils keeps its method signatures, so no panel code changes, and now hands the work to the prompts API added in BentoBox 3.25.0 (BentoBox#3140). The player gets a dialog with a text box where the server supports dialogs, and is asked in chat otherwise.

Callers get the same answers as before: the value on success, and null (or false for a confirmation) when the player cancels or does not answer.

Behaviour changes

  • Input is asked for in a dialog by default. Server admins can set island.dialogs.prompts: false in BentoBox's config to keep everything in chat.
  • Error messages for a bad number, and the cancel / done / confirm words in chat, now come from BentoBox's locale (prompts.*). This addon's own conversations.confirm-string, deny-string, exit-string, cancel-string, numeric-only, not-valid-value and prefix keys are no longer used.
  • A confirmation in chat is confirmed only by BentoBox's confirm word; anything else declines.
  • Pressing Escape on a dialog closes it without reopening the panel it came from.
  • Some question texts still say "in chat" or "write 'cancel' to exit", which reads oddly in a dialog. The wording is unchanged in this PR.

Requires BentoBox 3.25.0

bentobox.version is 3.25.0-SNAPSHOT because 3.25.0 is not released yet. Change it to 3.25.0 before releasing this addon.

Testing

  • ConversationUtilsTest rewritten (3 tests): answer, cancel, and a second question replacing a waiting one without stacking (the chunkblock value search causing player confusion #451 case). Full suite: 275 pass.
  • Not tested in game. The dialog path cannot be unit tested; the underlying prompts were tested in game for BentoBox#3140.

Level only has createStringInput (the value panel search), so the locale notes above apply only to level.conversations.prefix, cancel-string and cancelled.

Version

2.31.0 → 2.32.0, because 2.31.0 is already released and this raises the minimum BentoBox to 3.25.0. api-version in addon.yml is now 3.25.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HBXcjai4FihmV4n54fjjMe

Paper has deprecated org.bukkit.conversations for removal. ConversationUtils
keeps its method signature and now delegates to the prompts API added in
BentoBox 3.25.0, which shows a dialog where the server supports one and
asks in chat otherwise. Requires BentoBox 3.25.0. Version 2.32.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjai4FihmV4n54fjjMe
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit fd9032a into develop Nov 23, 2026
3 checks passed
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.

1 participant