Skip to content

Modernise java21 bentobox314#65

Open
tastybento wants to merge 3 commits into
developfrom
modernise-java21-bentobox314
Open

Modernise java21 bentobox314#65
tastybento wants to merge 3 commits into
developfrom
modernise-java21-bentobox314

Conversation

@tastybento
Copy link
Copy Markdown
Member

No description provided.

tastybento and others added 3 commits June 5, 2026 18:23
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>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 6, 2026

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