-
-
Notifications
You must be signed in to change notification settings - Fork 35
Version 1.22.1 #470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Version 1.22.1 #470
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
6f57d80
Version 1.22.1
tastybento 2a57d47
Fixes hex colors in action bar text. #461
tastybento 64f2121
Merge pull request #469 from BentoBoxWorld/461_No_support_for_HEX_col…
tastybento a450c6a
Upgrade to BentoBox 3.10.0 and Paper API 1.21.11, fix test NPE
tastybento 7b2843b
Initial plan
Copilot c79713d
Add Nexo custom block and item support
Copilot 7746c44
Include exception message in NexoCustomBlock error logging
Copilot 932ee9f
Exclude all transitive dependencies from Nexo to fix build
Copilot 52c712c
Merge pull request #474 from BentoBoxWorld/copilot/add-nexo-block-sup…
tastybento 7590f4b
Initial plan
Copilot 779653a
Initial plan
Copilot b287ccf
Update Russian locale (ru.yml) to MiniMessage format with grammar fixes
Copilot b1119b9
Merge pull request #479 from BentoBoxWorld/copilot/update-russian-lan…
tastybento 714754f
Fix ONEBLOCK_ACTIONBAR translation indentation in all locale files
Copilot 9bf7bbe
Initial plan
Copilot 9ad36b5
Merge branch 'develop' into copilot/fix-actionbar-translation-issue
tastybento ade88c5
Merge pull request #480 from BentoBoxWorld/copilot/fix-actionbar-tran…
tastybento b661f97
Fix wrong locale keys in AdminSanityCheck and add test
Copilot a92cbe1
Merge pull request #481 from BentoBoxWorld/copilot/fix-localization-i…
tastybento 61cb0cf
Update src/main/java/world/bentobox/aoneblock/listeners/BossBarListen…
tastybento c53b94b
Update CLAUDE.md
tastybento cb9507c
Initial plan
Copilot 0a216bf
Fix action bar color: use getTranslation instead of getTranslationNoC…
Copilot b886085
Complete assertion-less tests in OneBlocksManagerTest3 and fix test d…
tastybento 4e31e73
Add BlockListenerTest2 covering onPlayerInteract and spawnBlock
tastybento a038d97
Merge pull request #482 from BentoBoxWorld/copilot/sub-pr-470
tastybento efe905e
Reduce complexity of onPlayerInteract and spawnBlock in BlockListener
tastybento 047e944
Add MakeSpaceTest covering makeSpace and checkBlock logic
tastybento adc71ab
Refactor MakeSpace.makeSpace to reduce cognitive complexity
tastybento 03124b2
Remove redundant public modifier from @Test methods
tastybento File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Commands | ||
|
|
||
| ```bash | ||
| # Build | ||
| mvn clean package | ||
|
|
||
| # Run all tests | ||
| mvn test | ||
|
|
||
| # Run a single test class | ||
| mvn test -Dtest=TestClassName | ||
|
|
||
| # Run a single test method | ||
| mvn test -Dtest=TestClassName#methodName | ||
|
|
||
| # Full verify with coverage (JaCoCo) | ||
| mvn verify | ||
| ``` | ||
|
|
||
| ## Project Overview | ||
|
|
||
| AOneBlock is a BentoBox GameModeAddon for Minecraft. Players start on a single magic block in the sky; mining that block cycles through 18+ sequential phases (Plains, Underground, Ocean, Jungle, etc.), each with its own blocks, mobs, and chest loot. The plugin extends `GameModeAddon` from BentoBox and hooks into the Bukkit event system. | ||
|
|
||
| ## Key Architecture | ||
|
|
||
| **Entry point:** `AOneBlock.java` — registers listeners, commands, generators, and the `OneBlocksManager`. | ||
|
|
||
| **Phase system (`oneblocks/`):** | ||
| - `OneBlocksManager` — loads phase YAML files from `src/main/resources/phases/`, tracks per-island block counts, handles phase transitions, and resolves what block/mob/chest appears next. | ||
| - `OneBlockPhase` — represents a single phase with its block pool, mob pool, and chest tables. | ||
| - `OneBlockObject` — a single block-pool entry (can be a vanilla block, custom block, or mob spawn). | ||
| - `customblock/` — adapters for custom block types (ItemsAdder, Mob, raw BlockData). | ||
|
|
||
| **Data persistence:** `OneBlockIslands` (in `dataobjects/`) is stored via BentoBox's database abstraction. It tracks block count, phase name, and hologram state per island. | ||
|
|
||
| **Listeners (`listeners/`):** Handle the magic block break event (core gameplay loop), boss bar updates, hologram placement, island join/leave hooks, and protection flags. | ||
|
|
||
| **Events (`events/`):** `MagicBlockEvent`, `MagicBlockPhaseEvent`, and `BlockClearEvent` are fired during gameplay so other plugins can react. | ||
|
|
||
| **Commands:** | ||
| - Player: `/ob` (`PlayerCommand`) — sub-commands: count, phases, actionbar, bossbar, respawnblock, setcount | ||
| - Admin: `/oba` (`AdminCommand`) — sub-commands: setchest, sanitycheck, setcount | ||
|
|
||
| **World generation:** `ChunkGeneratorWorld` generates the empty void world with the single starter block. | ||
|
|
||
| **GUI:** `PhasesPanel` provides a clickable phase browser. | ||
|
|
||
| ## Testing | ||
|
|
||
| All tests extend `CommonTestSetup`, which sets up a MockBukkit server, mocks BentoBox and its managers (islands, players, worlds), and tears everything down after each test. Use Mockito and the repository's `world.bentobox.aoneblock.WhiteBox` helper for injecting state into private fields. | ||
|
|
||
| Phase YAML files under `src/main/resources/phases/` are loaded at startup; tests that exercise `OneBlocksManager` need those resources on the classpath (they are by default via Maven's test resource path). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.