Conversation
…ors_in_the_/ob_actionbar_command 461 no support for hex colors in the /ob actionbar command
|
- Bumps bentobox from 2.7.1-SNAPSHOT to 3.10.0 (release) - Bumps paper-api from 1.21.10 to 1.21.11 - Reverts mock-bukkit to v1.21-SNAPSHOT (v1.21.11-SNAPSHOT branch does not exist on JitPack) - Fixes InfoListenerTest NPE: BentoBox 3.10.0 User.getWorld() now requiresNonNull, so mock player world - Removes duplicate MockitoAnnotations.openMocks() call in CommonTestSetup - Cleans up repository declarations in pom.xml (explicit release/snapshot flags) - Adds CLAUDE.md developer guidance file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add NexoCustomBlock class using NexoBlocks API for placing blocks - Add NexoListener for NexoItemsLoadedEvent to reload phases on Nexo reload - Register Nexo creators in AOneBlock.onLoad() when Nexo plugin is present - Add Nexo Maven repository and dependency (provided scope) to pom.xml Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Nexo's transitive deps (libby-bukkit, triumph-gui) are not available in configured Maven repositories. Since Nexo is a provided-scope dependency only needed for API compilation, exclude all its transitive dependencies. Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…port Add Nexo custom block support
Agent-Logs-Url: https://github.com/BentoBoxWorld/AOneBlock/sessions/2583e283-0bd5-44cf-ab85-8041e7b8e307 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…guage-translation Update Russian locale to MiniMessage format with grammar corrections
Agent-Logs-Url: https://github.com/BentoBoxWorld/AOneBlock/sessions/0131bfea-10ed-4fd5-b095-34e4e8e9c3f7 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…slation-issue Fix ONEBLOCK_ACTIONBAR translation not appearing in settings
Agent-Logs-Url: https://github.com/BentoBoxWorld/AOneBlock/sessions/fb5502d8-1c4d-4023-92e7-0389b57f9296 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…ssue-sanity-command Fix wrong locale keys in AdminSanityCheck
There was a problem hiding this comment.
Pull request overview
This PR updates AOneBlock to v1.22.1, adds integration for the optional Nexo plugin (custom blocks + reload hook), and includes assorted test and locale updates alongside a BentoBox dependency bump.
Changes:
- Add Nexo support: custom block adapter + listener, plus addon wiring and Maven dependency/repository updates.
- Fix AdminSanityCheck to use the correct locale keys and add a dedicated unit test for it.
- Clean up/adjust tests and normalize locale YAML indentation (plus a large ru.yml refresh).
Reviewed changes
Copilot reviewed 11 out of 28 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/world/bentobox/aoneblock/listeners/InfoListenerTest.java | Adds missing player.getWorld() stubbing for test stability. |
| src/test/java/world/bentobox/aoneblock/CommonTestSetup.java | Removes duplicate Mockito initialization call. |
| src/test/java/world/bentobox/aoneblock/commands/admin/AdminSanityCheckTest.java | New unit tests validating AdminSanityCheck locale keys and behavior. |
| src/main/resources/locales/*.yml | Normalize ONEBLOCK_ACTIONBAR indentation; refresh ru.yml messages/formatting. |
| src/main/java/world/bentobox/aoneblock/oneblocks/customblock/NexoCustomBlock.java | Adds Nexo custom block placement implementation. |
| src/main/java/world/bentobox/aoneblock/listeners/NexoListener.java | Reload addon phase data when Nexo reloads its items. |
| src/main/java/world/bentobox/aoneblock/listeners/BossBarListener.java | Adjusts actionbar translation handling and sends Adventure Component. |
| src/main/java/world/bentobox/aoneblock/commands/admin/AdminSanityCheck.java | Fixes sanity command to use sanity locale keys instead of setchest keys. |
| src/main/java/world/bentobox/aoneblock/AOneBlock.java | Registers Nexo listener/custom block creators and exposes hasNexo(). |
| pom.xml | Bumps versions, adds Nexo dependency, and reorganizes repositories. |
| CLAUDE.md | Adds repository build/test notes and architecture/testing guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/world/bentobox/aoneblock/commands/admin/AdminSanityCheck.java
Show resolved
Hide resolved
src/main/java/world/bentobox/aoneblock/listeners/BossBarListener.java
Outdated
Show resolved
Hide resolved
…er.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@tastybento I can’t apply these changes because the pull request’s branch is the repository’s default branch, which I’m not allowed to push to directly. You can ask me to create a new pull request with the requested changes instead and I'll open a separate PR on a new branch. |
|
@tastybento I've opened a new pull request, #482, to work on those changes. Once the pull request is ready, I'll request review from you. |
…olor Agent-Logs-Url: https://github.com/BentoBoxWorld/AOneBlock/sessions/e3f2a3c8-3ea9-432e-b6df-84425ef30536 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…iscovery - Add meaningful assertions to 16 @test methods that previously had no assertions (only called methods under test without verifying results) - Fix setUp: mock MultiLib, DatabaseSetup, and CommandsManager to allow new AOneBlock() to succeed in isolation (mirrors AOneBlockTest pattern) - Remove icon field from test fixture YAML to avoid ItemParser null return in mock environment - Fix testSavePhase to explicitly create phases dir and assert true - Add Surefire include patterns for *Test?.java and *Test??.java so OneBlocksManagerTest3 is discovered in the full test suite (it was previously invisible due to the Test3 suffix not matching **/*Test.java) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 tests covering the main BlockListener methods: - onPlayerInteract: guard clauses (world, action, hand, block type, tool, island, center check) and brushing logic (in-progress, finished with gravel/sand sound, loot-table drops) - spawnBlock (via reflection): custom block, regular material, CHEST with items and uncommon-rarity particles, OAK_LEAVES (persistent flag), SUSPICIOUS_GRAVEL/SAND with and without loot table - onNewIsland / onDeletedIsland event handlers - onItemSpawn drop-on-top behaviour - onBlockBreak / onBlockBreakByMinion guard clauses - getIsland / saveIsland cache methods Also fixes CommonTestSetup to force Tag.LEAVES initialization from the real MockBukkit server before mockedBukkit is registered; this prevents Tag.LEAVES from becoming a RETURNS_DEEP_STUBS Mockito mock that is staled by clearInlineMocks() across tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix action bar color codes stripped by getTranslationNoColor
Extract three helper methods to lower cyclomatic complexity: - setLeavesPersistent(Block) — leaves state setup from spawnBlock - spawnSuspiciousBlock(Block, Material) — suspicious block data + loot table from spawnBlock - completeBrush(PlayerInteractEvent, Block) — brushing-finished logic from onPlayerInteract Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tests cover: block overlap/no-overlap, event firing and cancellation, water entity water/waterlogged block handling, mob protection setting, dolphin air-block-above rule, wide entity (X, Z, both) iteration, world max-height clamping, and BlockClearEvent list contents. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Merge nested isWaterProtected / y+1 guards into a single condition - Convert double for-loops with ++ to integer iteration (fixes SonarCloud S2179 — do not use ++ with floating-point variables); block coordinates are derived via Math.floor/ceil to preserve exact semantics - Extract processEntityWidth() for the X/Z width-expansion branches - Extract applyWaterBlock() for the waterBlocks forEach logic - Update MakeSpaceTest to stub world.getBlockAt(int,int,int) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JUnit 5 does not require test methods to be public. Stripped public from all 370 @test methods across the test suite. setUp() and tearDown() overrides retain public as required by Java visibility rules when overriding CommonTestSetup's public declarations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|



No description provided.