feat: /island donate inv — donate everything from inventory#422
Merged
tastybento merged 3 commits intodevelopfrom May 4, 2026
Merged
feat: /island donate inv — donate everything from inventory#422tastybento merged 3 commits intodevelopfrom
tastybento merged 3 commits intodevelopfrom
Conversation
Adds a confirmable "inv" subcommand that scans the player's inventory for donatable blocks, lists each material with its point value plus a total in the confirmation prompt, and on confirm donates all of them in one go. Items with no value or that are not donatable blocks remain in the inventory. Also fixes the donate tab-complete: the args list BentoBox passes to a subcommand includes the leaf label at index 0, so the previous size-1 check never fired in real use and only the auto "help" suggestion appeared. Tests now exercise the realistic args shape. Bumps build version to 2.27.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the four new island.donate.inv keys (keyword, confirm-header, confirm-line, confirm-total) to every non-English locale file. MiniMessage tags and placeholders are preserved verbatim; only the human-readable text was translated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses SonarCloud findings about duplicated string literals in IslandDonateCommand. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
/island donate invsubcommand: lists every donatable block in the player's inventory with per-material values and a total, then on confirm donates them all and runs a level recalc. Items with no value or non-blocks stay in the inventory.parameters: "[hand [amount]] [inv]"to show[inv]as an optional alternative.args.get(0), so the priorargs.size() <= 1branch never fired in real use and only autohelpshowed. Tab-complete now suggestshand/invfor the first user-arg slot and the held-item count afterhand. Tests now exercise the realistic args shape (["donate", ""]).Test plan
mvn test(47 tests, all green)mvn packageproducesLevel-2.27.0-SNAPSHOT-LOCAL.jar/is donate <TAB>showshand,inv,help/is donate invshows the per-material breakdown + total, then on re-issue donates and recalculates the levelinvdonation/is donate hand <TAB>still suggests the held count🤖 Generated with Claude Code