Skip to content

Release 2.26.0#421

Merged
tastybento merged 8 commits intomasterfrom
develop
May 4, 2026
Merged

Release 2.26.0#421
tastybento merged 8 commits intomasterfrom
develop

Conversation

@tastybento
Copy link
Copy Markdown
Member

No description provided.

tastybento and others added 8 commits May 2, 2026 15:04
DonationPanel previously had a hardcoded 36-slot, 4-row layout. Move it
to the standard BentoBox templated-panel pattern so admins can change
rows, button positions, and icons via panels/donation_panel.yml without
touching code. The panel still uses a custom listener for the
drag-and-drop donation slots; only layout resolution is template-driven,
with the original hardcoded layout kept as a fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rce-shown format

Agent-Logs-Url: https://github.com/BentoBoxWorld/Level/sessions/9233b785-a13b-4ea5-9b58-18fe24bdf4e9

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- DonationPanel: use HashSet.newHashSet (S6485) and method reference
  for forEach (S1612).
- DonationPanelLayout: replace 15-param constructor (S107) with a
  Builder accumulator. Extract processCell/addDecorative helpers from
  fromTemplate to bring cognitive complexity (S3776) and brain-method
  metrics (S6541) under threshold, eliminating the multi-decl
  warnings (S1659) and reducing in-loop continues (S135).
- DonationPanelLayoutTest: use assertNotEquals instead of assertTrue
  with != (S5785).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-panel

feat: make donation panel size and layout configurable
Removed `public` from JUnit 5 test classes and `@Test`-annotated
methods across 24 files. Lifecycle methods (`setUp`/`tearDown`) that
are overridden across packages from CommonTestSetup are lowered to
`protected` rather than package-private — Java forbids reducing
override visibility further.

Skipped LevelsManagerTest and EquationEvaluatorTest, which still use
JUnit 4's `org.junit.Test` and require `public`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
These two files were the last holdouts using org.junit.Test (JUnit 4).
With no junit-vintage engine on the classpath, the JUnit 5 runner was
silently skipping their @test methods — LevelsManagerTest reported
0 tests run for years.

Changes:
- Switch imports from org.junit.{Test, Assert.*} to
  org.junit.jupiter.api.{Test, Assertions.*}.
- Apply S5786 visibility lowering consistent with the rest of the
  test suite (class package-private, @test methods package-private,
  setUp/tearDown overrides protected).
- Flip assertTrue arg order on the now-active descending-order check
  in testGetTopTenSortOrder (JUnit 5 puts the message last).
- LevelsManagerTest only: drop the redundant @mock IslandWorldManager
  iwm field that was shadowing CommonTestSetup's iwm — the parent
  already wires plugin.getIWM() to its own iwm, so configuring the
  shadow had no effect.
- LevelsManagerTest only: stub Bukkit.getPlayer(any(UUID)) -> null so
  hasTopTenPerm short-circuits via the null check (RETURNS_DEEP_STUBS
  was returning a player whose hasPermission defaulted to false,
  which made the now-active rankings tests fail).

Test count: 190 -> 208.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

@tastybento tastybento merged commit 93c3c94 into master May 4, 2026
5 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.

2 participants