This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Bank is a BentoBox addon for Minecraft (Spigot) that provides an island-based banking/economy system. It integrates with Vault for economy operations and supports multiple BentoBox game modes (BSkyBlock, AOneBlock, AcidIsland, SkyGrid, CaveBlock).
mvn clean package # Build the plugin JAR
mvn test # Run tests only
mvn verify # Build + tests + coverageOutput JAR goes to target/. The build requires Java 21+.
- JUnit 5 (Jupiter) with Mockito (incl. static mocking) and MockBukkit
- Run a single test:
mvn test -Dtest=BankManagerTest - Tests are in
src/test/java/world/bentobox/bank/mirroring main source structure - JaCoCo coverage reports:
target/site/jacoco/
Entry point: BankPladdon → Bank (addon lifecycle: onEnable loads Vault, config, BankManager, registers commands with each game mode)
Core layers:
- BankManager — Central business logic: deposit/withdraw/balance operations, compound interest calculation, LRU cache (max 20 accounts), async database persistence. Listens for island deletion events to clean up accounts.
- Money — Value type wrapping
BigDecimalwith 2 decimal places. All currency arithmetic goes through this class. - BankAccounts — Persisted data object per island (balance, transaction history, interest timestamp). Uses BentoBox's database layer.
- Settings — Maps to
config.yml. Interest rate, compound period, cooldown, game modes, command names.
Command hierarchy:
commands/user/— Player commands (balance, deposit, withdraw, statement, baltop) registered under each game mode's island commandcommands/admin/— Admin commands (balance, give, set, take, statement) with AbstractAdminBankCommand handling target player resolution- Both extend
AbstractBankCommandwhich provides shared argument parsing
PhManager — Registers BentoBox placeholders for each game mode (balance, top-N rankings). Caches top-10 for 10 seconds.
- Paper API 1.21.x
- BentoBox 3.14.0-SNAPSHOT
- Vault API 1.7
23 language files in src/main/resources/locales/, matching BentoBox's full locale set (cs, de, en-US, es, fr, hr, hu, id, it, ja, ko, lv, nl, pl, pt, pt-BR, ro, ru, tr, uk, vi, zh-CN, zh-HK). en-US.yml is the reference; all other files must carry the same keys. Message keys are referenced in commands via BentoBox's user.sendMessage() system. Use the /sync-locales skill to find and fill missing keys.
GitHub Actions (.github/workflows/build.yml): triggers on push to develop and PRs. Runs Maven verify with SonarCloud analysis using Java 21.
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/