Skip to content

Release 1.10.0#66

Open
tastybento wants to merge 35 commits into
masterfrom
develop
Open

Release 1.10.0#66
tastybento wants to merge 35 commits into
masterfrom
develop

Conversation

@tastybento

Copy link
Copy Markdown
Member

No description provided.

Copilot AI and others added 19 commits March 28, 2026 18:43
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/main/java/world/bentobox/bank/BankManager.java
Comment thread src/main/java/world/bentobox/bank/PhManager.java
Comment thread src/main/java/world/bentobox/bank/commands/user/DepositCommand.java
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread src/main/resources/locales/it.yml Outdated
Comment thread src/main/resources/locales/it.yml Outdated
Comment thread src/main/resources/locales/it.yml Outdated
Comment thread src/main/resources/locales/en-US.yml Outdated
tastybento and others added 8 commits June 12, 2026 17:15
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>
tastybento and others added 2 commits June 12, 2026 17:19
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 47 out of 47 changed files in this pull request and generated 5 comments.

Comment thread src/main/java/world/bentobox/bank/PhManager.java
Comment thread src/main/java/world/bentobox/bank/BankManager.java Outdated
Comment thread pom.xml Outdated
Comment thread src/main/resources/locales/de.yml Outdated
Comment thread src/main/resources/locales/de.yml Outdated
tastybento and others added 6 commits June 12, 2026 18:27
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>
@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants