This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Border is a BentoBox addon for Minecraft Paper servers that creates and renders per-player world borders around islands. Players cannot pass the border. It supports two rendering modes: barrier blocks with particles, and vanilla world borders.
Target: Paper 1.21+ with BentoBox 3.12+, Java 21
mvn clean package # Build the plugin JAR
mvn test # Run all tests
mvn test -Dtest=BorderTest # Run a single test class
mvn verify # Full build with JaCoCo coverageOutput JAR: target/Border-{version}.jar
BorderPladdon (plugin entry point) → Border (addon, extends Addon) → registers commands, listeners, and border implementations per game mode.
BorderShower is the core interface with methods: showBorder, hideBorder, clearUser, refreshView, teleportEntity.
Two implementations:
ShowBarrier— Renders barrier blocks and colored particles around island edges. Caches barrier block positions per player. Uses async chunk loading.ShowWorldBorder— Uses Paper's per-player WorldBorder API. Manipulates border animation (shrink/grow/static) to achieve color effects.
PerPlayerBorderProxy delegates to the correct implementation based on per-player metadata. Falls back to addon-wide default settings.
Player preferences are stored as BentoBox MetaDataValue entries:
Border_state— border on/off toggleBorder_bordertype— BARRIER or VANILLA (stored as byte id)Border_color— RED, GREEN, or BLUE
Registered as subcommands under each game mode's player command:
IslandBorderCommand(/[gamemode] border) — toggle border visibilityBorderTypeCommand(/[gamemode] bordertype) — switch between barrier/vanillaBorderColorCommand(/[gamemode] bordercolor) — change border color
PlayerListener handles all player events (join, quit, move, teleport, mount, item drop) to trigger border show/hide/refresh and enforce boundary teleportation.
Uses JUnit 5 + Mockito 5 + MockBukkit. All test classes extend CommonTestSetup which provides comprehensive mocking of BentoBox, Bukkit server, worlds, players, and island managers.
WhiteBox is a reflection utility for accessing private fields in tests.
- Configuration is managed via the
Settingsclass with BentoBox's@StoreAt/@ConfigCommentannotations andConfig<Settings>loader - Game modes can be excluded via
Settings.getDisabledGameModes() - Localization files live in
src/main/resources/locales/(20+ languages, YAML format) BorderTypeis an enum with byte-based serialization ids (fromId/getId)
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/