Skip to content

Release 2.0.0#13

Merged
tastybento merged 12 commits into
masterfrom
develop
Apr 26, 2026
Merged

Release 2.0.0#13
tastybento merged 12 commits into
masterfrom
develop

Conversation

@tastybento
Copy link
Copy Markdown
Member

No description provided.

Copilot AI and others added 12 commits April 5, 2026 11:39
Agent-Logs-Url: https://github.com/BentoBoxWorld/TopBlock/sessions/8bbe2987-7542-416b-8201-ecded7380737

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…uage

Add Russian locale (MiniMessage format)
The @eventhandler on TopBlockManager.startMonitoring was declared
private, so Bukkit silently skipped it. BentoBoxReadyEvent never
fired the refresh task, the topTen list stayed empty, and the panel
only ever rendered fallback (LIME_STAINED_GLASS_PANE) items — no
player head, no stats. Renamed to public onBentoBoxReady.

Also removed dead code surfaced while diffing against the Level
addon: the large commented-out WARP/VISIT/VIEW block in
TopLevelPanel (TopBlock has no warp/visit hooks), the unused
ConversationUtils class, and the unused helpers in Utils
(sendMessage, getNextValue, getPreviousValue, prettifyObject,
prettifyDescription).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Java 17 -> 21
- Spigot -> Paper 1.21.11-R0.1-SNAPSHOT
- BentoBox 2.7.1-SNAPSHOT -> 3.14.0-SNAPSHOT
- AOneBlock 1.12.3-SNAPSHOT -> 1.18.0
- Drop PowerMock; add JUnit 5 + MockBukkit + Mockito 5 deps
- Maven plugins refreshed (compiler 3.15.0 with fork=true,
  surefire 3.5.2, shade 3.6.0, jar 3.4.2, javadoc 3.11.2,
  source 3.3.1, install/deploy 3.1.3, jacoco 0.8.12)
- Add papermc, codemc-snapshots and jitpack repos; drop spigot repo
- Bump build.version to 2.0.0
- TopBlockPladdon: cache the Addon instance instead of building a
  fresh one on every getAddon() call
- Fix typo in plugin.yml api-version (`"1.21""` -> `"1.21"`)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replaces the old JUnit 4 + PowerMock TopBlockManagerTest (which had
been broken since the Java 17 migration with `Cannot redefine
singleton Server` errors) with a JUnit 5 + MockBukkit suite
following the CaveBlock pattern:

- CommonTestSetup: shared base wiring up Bukkit, BentoBox singleton,
  IslandWorldManager / IslandsManager / PlayersManager / Locales /
  Placeholders / Notifier / Hooks mocks
- WhiteBox: tiny reflective static-field setter for injecting the
  BentoBox singleton
- TestWorldSettings: minimal WorldSettings impl
- TopBlockTest: addon load / enable / disable / reload, with a
  synthesised in-memory addon.jar holding config.yml and
  panels/top_panel.yml
- TopBlockManagerTest: data flow through getOneBlockData and
  formatLevel (covers shorthand k / M / G branches)
- PlaceholderManagerTest: getMemberNames sort order and
  out-of-range rank handling
- mocks/ServerMocks.java removed (replaced by MockBukkit)

Total: 22 tests passing (TopBlock 6, TopBlockManager 13,
PlaceholderManager 3).

Also adds CLAUDE.md describing the addon's architecture and the
gotchas that were time-consuming to rediscover (Pladdon split,
private @eventhandler trap, locale resource filtering, surefire
--add-opens requirement).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds the permission with default: true so every player is included
unless an admin removes it. Filtering is on the island owner only,
applied at refresh time in getOneBlockData. Offline owners always
pass — admins must remove the perm from a player who can actually
log in. README updated to describe the behaviour.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- GitHub Actions: bump checkout/setup-java/cache to v4, switch to
  the temurin distribution (adopt is deprecated), and target
  Java 21 instead of Java 17. Drop the redundant
  -Dsonar.projectKey CLI flag — it's already set in pom.xml.
- README: fix the "level addon jar" copy/paste, document
  requirements (Paper 1.21, Java 21, BB 3.14.0, AOneBlock 1.18.0),
  add a config table for refresh-time and shorthand, document the
  /oneblock topblock alias, explain how a player gets into the top
  ten, document the topblock.icon.<MATERIAL> per-player override,
  and clarify placeholder behaviour past the available rank count.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Modernise to BentoBox 3.14.0 / Paper / Java 21 and fix top ten panel
Adds locale files matching all languages present in BentoBox core:
cs, de, es, fr, hr, hu, id, it, ja, ko, lv, nl, pl, pt-BR, pt,
ro, tr, uk, vi, zh-CN, zh-HK.

All 35 keys translated per file. Color codes and placeholders
([name], [player], [number], [count], [lifetime]) preserved exactly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Surefire's hardcoded <argLine> block was replacing the ${argLine}
property entirely, so JaCoCo's prepare-agent javaagent flag was
discarded and jacoco.exec stayed empty. Prepend @{argLine} (late-
binding syntax, evaluated after prepare-agent sets it) so both the
JaCoCo agent and the --add-opens flags are active at test time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@tastybento tastybento merged commit 16a5220 into master Apr 26, 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