This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
BSkyBlock is a SkyBlock game mode addon for BentoBox, a Minecraft Bukkit/Paper island management framework. It extends GameModeAddon to provide sky-based island worlds with custom chunk generation.
mvn clean package # Build the JAR
mvn test # Run all tests
mvn clean verify # Run tests with JaCoCo coverage reportsMaven profiles control versioning: CI sets -b${BUILD_NUMBER}, master branch removes -SNAPSHOT. Java 21 required.
Entry points:
BSkyBlockPladdon— Paper plugin entry point (Pladdon lazy-loading pattern)BSkyBlock— Core addon extendingGameModeAddon, manages lifecycle (onLoad/onEnable/onDisable/onReload), registers commands, creates Overworld/Nether/End worlds
Key classes:
Settings— Large configuration class (~100+ properties) with BentoBox@ConfigEntry/@ConfigCommentannotations, extendsWorldSettingsChunkGeneratorWorld— CustomChunkGeneratorfor sky worlds, handles Nether roof generation, sea level, biome placementIslandAboutCommand— Simple composite command ("about"/"ab")
Package: world.bentobox.bskyblock
Uses JUnit 5 (Jupiter) + Mockito + MockBukkit. Test classes mirror main structure under src/test/java/. The CommonTestSetup base class boots MockBukkit, opens Mockito annotations, installs MockedStatic<Bukkit> / MockedStatic<Util>, and wires up the BentoBox plugin, IWM, IslandsManager, Player, World, etc. WhiteBox is a small reflection helper that replaces PowerMock's Whitebox.
Surefire is configured with --add-opens JVM args for Java 21 module access (needed by Mockito inline mock maker and JaCoCo).
- Always extend
CommonTestSetupfor tests that touch Bukkit/BentoBox state. OverridesetUp/tearDownwith@BeforeEach/@AfterEachand callsuper.setUp()/super.tearDown()first/last. - Per-test
MockedStatic(e.g.DatabaseSetup) should be created insetUpaftersuper.setUp()and closed intearDownbeforesuper.tearDown()viacloseOnDemand(). SeeBSkyBlockTestfor the pattern. Bukkit::getServeris already stubbed byCommonTestSetupto return MockBukkit'sServerMock. If a test needs a Mockito-controlled server (e.g. to stubcreateChunkData()), re-stub it aftersuper.setUp():mockedBukkit.when(Bukkit::getServer).thenReturn(myMockServer);—ChunkGeneratorWorldTestdoes this.- Do not use
eq(Biome.X)(or any registry-backedKeyedconstant) inverify. Under MockBukkit,Biome.TAIGAresolves through the mocked registry and may return distinctBiomeMockinstances per call site, so identity-basedeq()matching fails. UseargThat(b -> "taiga".equals(b.getKey().getKey()))instead. The same caution applies to otherKeyedregistries (Material/ItemType/BlockType/Tag/etc.). - Mind the Settings defaults when verifying chunk-generator output.
ChunkGeneratorWorldreads biomes fromSettings.getDefaultBiome()/getDefaultNetherBiome()/getDefaultEndBiome()(defaults: PLAINS / NETHER_WASTES / THE_END), not from hard-coded constants. The pre-migration tests asserted TAIGA / END_MIDLANDS / CRIMSON_FOREST and only "passed" because PowerMock null-mocked every enum constant.
maven-compiler-plugin 3.13.0 / 3.14.0 in non-forked mode crashes on JDK 25 with Fatal error compiling: Cannot load from object array because "this.hashes" is null while formatting a deprecation diagnostic. The actual compile is fine — only the in-process plexus diagnostic formatter throws. The POM works around this by setting <fork>true</fork> on the compiler plugin. CI on JDK 21 is not affected, but the fork is harmless there. If you ever see that NPE, do not assume there is a real compile error — try forking first, or run javac directly to surface the truth.
- Paper API 1.21.11 — Minecraft server API (
providedscope) - BentoBox 3.14.0-SNAPSHOT — Core framework (
providedscope, addon API version inaddon.yml) - MockBukkit v1.21-SNAPSHOT — server mock used in tests (via JitPack)
addon.yml— BentoBox addon descriptor (permissions, API version, icon)plugin.yml— Paper plugin descriptorconfig.yml— Default configuration (island settings, world properties, biomes, game rules)locales/— 22 language filesblueprints/— Island blueprint.bluand.jsonfiles
When you need to inspect source code for a dependency (e.g., BentoBox, addons):
- Check local Maven repo first:
~/.m2/repository/— sources jars are named*-sources.jar - Check the workspace: Look for sibling directories or Git submodules that may contain the dependency as a local project (e.g.,
../bentoBox,../addon-*) - Check Maven local cache for already-extracted sources before downloading anything
- Only download a jar or fetch from the internet if the above steps yield nothing useful
Prefer reading .java source files directly from a local Git clone over decompiling or extracting a jar.
In general, the latest version of BentoBox should be targeted.
Related projects are checked out as siblings under ~/git/:
Core:
bentobox/— core BentoBox framework
Game modes:
addon-acidisland/— AcidIsland game modeaddon-bskyblock/— BSkyBlock game modeBoxed/— Boxed game mode (expandable box area)CaveBlock/— CaveBlock game modeOneBlock/— AOneBlock game modeSkyGrid/— SkyGrid game modeRaftMode/— Raft survival game modeStrangerRealms/— StrangerRealms game modeBrix/— plot game modeparkour/— Parkour game modeposeidon/— Poseidon game modegg/— gg game mode
Addons:
addon-level/— island level calculationaddon-challenges/— challenges systemaddon-welcomewarpsigns/— warp signsaddon-limits/— block/entity limitsaddon-invSwitcher//invSwitcher/— inventory switcheraddon-biomes//Biomes/— biomes managementBank/— island bankBorder/— world border for islandsChat/— island chatCheckMeOut/— island submission/votingControlPanel/— game mode control panelConverter/— ASkyBlock to BSkyBlock converterDimensionalTrees/— dimension-specific treesdiscordwebhook/— Discord integrationDownloads/— BentoBox downloads siteDragonFights/— per-island ender dragon fightsExtraMobs/— additional mob spawning rulesFarmersDance/— twerking crop growthGravityFlux/— gravity addonGreenhouses-addon/— greenhouse biomesIslandFly/— island flight permissionIslandRankup/— island rankup systemLikes/— island likes/dislikesLimits/— block/entity limitslost-sheep/— lost sheep adventureMagicCobblestoneGenerator/— custom cobblestone generatorPortalStart/— portal-based island startpp/— pp addonRegionerator/— region managementResidence/— residence addonTopBlock/— top ten for OneBlockTwerkingForTrees/— twerking tree growthUpgrades/— island upgrades (Vault)Visit/— island visitingweblink/— web link addonCrowdBound/— CrowdBound addon
Data packs:
BoxedDataPack/— advancement datapack for Boxed
Documentation & tools:
docs/— main documentation sitedocs-chinese/— Chinese documentationdocs-french/— French documentationBentoBoxWorld.github.io/— GitHub Pages sitewebsite/— websitetranslation-tool/— translation tool
Check these for source before any network fetch.
world.bentobox:bentobox→~/git/bentobox/src/