This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Chat is a BentoBox addon for Minecraft (Paper) that provides Team Chat and Island Chat for island-type game modes (BSkyBlock, AcidIsland, CaveBlock, SkyGrid). It requires Java 21 and targets Paper 1.21.11.
mvn clean package # Build (default goal)
mvn test # Run all tests
mvn -Dtest=ChatListenerTest test # Run a single test class
mvn -Dtest=ChatListenerTest#onChat test # Run a single test methodThe build produces target/Chat-{version}-SNAPSHOT-LOCAL.jar.
This is a BentoBox Pladdon (plugin-addon):
ChatPladdon— Entry point loaded by BentoBox's Pladdon system, creates theChataddon instanceChat— Main addon class. On enable: loadsSettingsfrom config.yml, registers commands per game mode, createsChatListener, and registers theIsTeamChatHandlerrequest handlerChatListener— Core logic. Implements bothListenerandEventExecutor. InterceptsAsyncPlayerChatEvent(registered manually with configurable priority from Settings). Maintains in-memory sets for team chat users, island chatters, team spies, and island spies. All toggle state is held in memory (not persisted)Settings— BentoBoxConfigObjectstored ataddons/Chat/config.yml. Controls which game modes have team/island chat, logging, event priority, and default chat game modeIsTeamChatHandler— BentoBox request handler that lets other addons query if a player has team chat enabled
Commands follow BentoBox's CompositeCommand pattern and are registered dynamically onto each game mode's player/admin command trees:
- Player:
IslandChatCommand(chat),IslandTeamChatCommand(teamchat),IslandTeamMuteCommand(muteteamchat) - Admin:
AdminIslandChatSpyCommand(chatspy),AdminTeamChatSpyCommand(teamchatspy)
Tests use JUnit 5 + Mockito + MockBukkit. The CommonTestSetup base class provides standard mocks for BentoBox, Bukkit, Player, World, Island, etc. New test classes should extend CommonTestSetup and call super.setUp()/super.tearDown(). The WhiteBox utility sets private/static fields via reflection for test setup.
Localization strings are defined in src/main/resources/locales/ (en-US.yml is the primary locale).
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:bentobox3.14.0-SNAPSHOT→~/git/bentobox/src/