Release 1.10.0#66
Open
tastybento wants to merge 35 commits into
Open
Conversation
Add a new placeholder `{gamemode}_latest_transaction` that displays
the most recent bank transaction for a user's island in the format
"[Username] [TxType] $[Amount]" (e.g., "tastybento Deposited $500.0").
- Add BankManager.getLatestHistory(Island) to retrieve latest transaction
- Register new placeholder in PhManager.registerPlaceholders()
- Add helper methods for formatting transaction display
- Add comprehensive unit tests for the new placeholder
Agent-Logs-Url: https://github.com/BentoBoxWorld/Bank/sessions/dbe38bf1-aeda-4c8e-94ee-b3201aaad055
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…ion-placeholder Add latest transaction placeholder
Removed coverage badge from README.
- Reduce cognitive complexity in DepositCommand by extracting notifyMembers() - Replace Stream.collect(Collectors.toList()) with Stream.toList() in BankManager - Fix empty tearDown() and unnecessary throws in MoneyTest - Use assertEquals/assertNotEquals instead of assertTrue/assertFalse in MoneyTest - Remove commented-out code blocks in WithdrawCommandTest - Rename shadowing local variable 'plugin' to 'pluginMock' in 9 test setUp() methods - Remove ~100 unnecessary Mockito eq() wrappers across all test files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Incorporate the Russian translation from issue #62 as ru.yml, sync the two newer alert keys (bank.deposit.alert, bank.withdraw.alert) into cs/de/ja, and add the 10 languages BentoBox supports that Bank was missing: hr, hu, lv, nl, pl, pt-BR, pt, ro, tr, zh-HK. Bank's locale set now matches BentoBox's 23-language set. All files validated as YAML and confirmed in sync with en-US (55 keys each). Closes #62 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Document build/test commands, architecture, dependencies, localization (23-language set matching BentoBox), CI, and project layout for Claude Code. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ales Add Russian locale and all missing BentoBox languages
Modernise the build: bump java.version to 21, replace the Spigot API with Paper 1.21.11, and target BentoBox 3.14.0-SNAPSHOT. Production code compiles unchanged against the new API. Swap the test stack from JUnit 4 + PowerMock to JUnit 5 + MockBukkit + Mockito 5. Replace the Spigot repository with PaperMC and add the codemc snapshots repository for MockBukkit. Add <fork>true</fork> to the compiler plugin for Java 21. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rewrite all 13 test classes (158 tests) from JUnit 4 + PowerMock to JUnit 5 + MockBukkit + Mockito 5, preserving full coverage and the same 158 test cases. Add shared MockBukkit infrastructure (WhiteBox, TestWorldSettings, CommonTestSetup) adapted from the CaveBlock pattern. PowerMock static mocking is replaced with Mockito inline static mocks (Bukkit, Util, DatabaseSetup) and a real MockBukkit server. MoneyTest and PhManagerTest run as standalone Mockito tests since they need no Bukkit server. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match the Paper 1.21.11 / Java 21 target. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace all legacy ampersand color codes (&a, &c, &9, etc.) with their MiniMessage tag equivalents (<green>, <red>, <blue>, ...) across the 12 locale files. BentoBox renders MiniMessage natively. 292 codes converted; all files validated as YAML and rendering is unchanged (open tags apply to the rest of the string, matching legacy semantics). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Convert locale color codes to MiniMessage format
Modernise java21 bentobox314
Contributor
There was a problem hiding this comment.
Pull request overview
Release 1.10.0 modernizes the addon for the newer BentoBox/Paper ecosystem, refreshes localization formatting, and updates/expands the automated test suite to JUnit 5 with MockBukkit.
Changes:
- Upgrade build/runtime targets (Java 21, Paper API, BentoBox dependency updates) and CI actions.
- Migrate tests from JUnit 4/PowerMock to JUnit 5/Mockito + introduce shared
CommonTestSetup. - Add a new placeholder for latest island transaction and add/refresh multiple locale files.
Reviewed changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/world/bentobox/bank/WhiteBox.java | Adds small reflection helper for setting static fields in tests. |
| src/test/java/world/bentobox/bank/TestWorldSettings.java | Adds minimal WorldSettings test implementation. |
| src/test/java/world/bentobox/bank/PhManagerTest.java | Migrates tests to JUnit 5 and adds coverage for new latest-transaction placeholder. |
| src/test/java/world/bentobox/bank/data/MoneyTest.java | Migrates Money tests to JUnit 5 assertions/exception style. |
| src/test/java/world/bentobox/bank/CommonTestSetup.java | Introduces shared MockBukkit/Mockito static setup & teardown for tests. |
| src/test/java/world/bentobox/bank/commands/user/WithdrawCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/commands/user/StatementCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/commands/user/DepositCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/commands/user/BalanceCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/commands/admin/AdminTakeCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/commands/admin/AdminStatementCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/commands/admin/AdminSetCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/commands/admin/AdminGiveCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/commands/admin/AdminBalanceCommandTest.java | Migrates to JUnit 5 and uses CommonTestSetup. |
| src/test/java/world/bentobox/bank/BankTest.java | Updates addon lifecycle tests to JUnit 5 + new DB mocking approach. |
| src/test/java/world/bentobox/bank/BankManagerTest.java | Updates manager tests to JUnit 5 + new DB mocking approach. |
| src/main/resources/plugin.yml | Bumps Bukkit api-version to 1.21. |
| src/main/resources/locales/zh-HK.yml | Adds new locale file. |
| src/main/resources/locales/zh-CN.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/vi.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/uk.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/tr.yml | Adds new locale file. |
| src/main/resources/locales/ru.yml | Adds new locale file. |
| src/main/resources/locales/ro.yml | Adds new locale file. |
| src/main/resources/locales/pt.yml | Adds new locale file. |
| src/main/resources/locales/pt-BR.yml | Adds new locale file. |
| src/main/resources/locales/pl.yml | Adds new locale file. |
| src/main/resources/locales/nl.yml | Adds new locale file. |
| src/main/resources/locales/lv.yml | Adds new locale file. |
| src/main/resources/locales/ko.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/ja.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/it.yml | Converts many messages to MiniMessage-style formatting (has placeholder/text issues). |
| src/main/resources/locales/id.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/hu.yml | Adds new locale file. |
| src/main/resources/locales/hr.yml | Adds new locale file. |
| src/main/resources/locales/fr.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/es.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/en-US.yml | Converts many messages to MiniMessage-style formatting (has a typo). |
| src/main/resources/locales/de.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/resources/locales/cs.yml | Converts many messages to MiniMessage-style formatting. |
| src/main/java/world/bentobox/bank/PhManager.java | Registers new *_latest_transaction placeholder and formats output. |
| src/main/java/world/bentobox/bank/commands/user/DepositCommand.java | Extracts deposit alert logic into notifyMembers. |
| src/main/java/world/bentobox/bank/BankManager.java | Adds getLatestHistory and modernizes getHistory list collection. |
| README.md | Removes Sonar coverage badge. |
| pom.xml | Updates Java level/dependencies (Paper, JUnit 5, Mockito, MockBukkit) and plugin versions. |
| CLAUDE.md | Adds repo guidance doc (currently contains outdated build/test/dependency info). |
| .github/workflows/build.yml | Updates GitHub Actions to v4 actions and keeps Java 21 build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>
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>
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>
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>
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>
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>
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>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
A prior automated edit inlined the fully-qualified name world.bentobox.bentobox.util.Util.getWorld(world), but the method parameter `world` shadowed the package root, so the compiler parsed `world.bentobox` as field access on the World variable and failed with "cannot find symbol variable bentobox". Revert to the original direct island lookup via getIsland(world, user), which is what the getLatestTransaction tests expect. This fixes the Jenkins compile failure and the 4 PhManagerTest errors (and their cascading "Already mocking" failures) the broken Util call caused. Co-Authored-By: Claude Opus 4.8 (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.



No description provided.