-
-
Notifications
You must be signed in to change notification settings - Fork 9
Release 4.8.1 #164
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
Release 4.8.1 #164
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2b0097e
Add CLAUDE.md with project guidance for Claude Code
tastybento 541a85c
Fix world border not resetting when teleporting between islands
tastybento b60f4e3
Bump build version to 4.8.1 in pom.xml
tastybento cc8c9be
Refactor world handling in Border and PlayerListener for improved tel…
tastybento 6bac390
Update src/main/java/world/bentobox/border/listeners/PlayerListener.java
tastybento a994c1e
Refactor inGameWorld checks in Border and PlayerListener for clearer …
tastybento 534108d
Merge remote-tracking branch 'origin/develop' into develop
tastybento 9f35bf0
Initial plan
Copilot 0bed402
Initial plan
Copilot c040ce3
Initial plan
Copilot 15d86d8
Update src/main/java/world/bentobox/border/listeners/PlayerListener.java
tastybento 3ac1d39
Update src/main/java/world/bentobox/border/listeners/PlayerListener.java
tastybento 7442947
Remove redundant testOnPlayerTeleportInVanillaNether and testOnPlayer…
Copilot cdd270c
Fix testOnPlayerLeaveIslandVanillaNether/End to correctly test early-…
Copilot 683c1c4
Merge pull request #167 from BentoBoxWorld/copilot/sub-pr-164-another…
tastybento cf303f1
Merge branch 'develop' into copilot/sub-pr-164-again
tastybento 7b55e24
Add tests for inGameWorld() vanilla nether/end early-return paths
Copilot 5d0e9d5
Merge pull request #166 from BentoBoxWorld/copilot/sub-pr-164-again
tastybento f67665d
Merge pull request #165 from BentoBoxWorld/copilot/sub-pr-164
tastybento 1f9217a
Update src/test/java/world/bentobox/border/listeners/PlayerListenerTe…
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
Some comments aren't visible on the classic Files Changed page.
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,67 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| 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.10+, Java 21 | ||
|
|
||
| ## Build Commands | ||
|
|
||
| ```bash | ||
| 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 coverage | ||
| ``` | ||
|
|
||
| Output JAR: `target/Border-{version}.jar` | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Addon Lifecycle (BentoBox Pladdon pattern) | ||
|
|
||
| `BorderPladdon` (plugin entry point) → `Border` (addon, extends `Addon`) → registers commands, listeners, and border implementations per game mode. | ||
|
|
||
| ### Border Rendering — Strategy + Proxy | ||
|
|
||
| `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. | ||
|
|
||
| ### Per-Player State via Metadata | ||
|
|
||
| Player preferences are stored as BentoBox `MetaDataValue` entries: | ||
| - `Border_state` — border on/off toggle | ||
| - `Border_bordertype` — BARRIER or VANILLA (stored as byte id) | ||
| - `Border_color` — RED, GREEN, or BLUE | ||
|
|
||
| ### Commands | ||
|
|
||
| Registered as subcommands under each game mode's player command: | ||
| - `IslandBorderCommand` (`/[gamemode] border`) — toggle border visibility | ||
| - `BorderTypeCommand` (`/[gamemode] bordertype`) — switch between barrier/vanilla | ||
| - `BorderColorCommand` (`/[gamemode] bordercolor`) — change border color | ||
|
|
||
| ### Event Handling | ||
|
|
||
| `PlayerListener` handles all player events (join, quit, move, teleport, mount, item drop) to trigger border show/hide/refresh and enforce boundary teleportation. | ||
|
|
||
| ## Testing | ||
|
|
||
| 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. | ||
|
|
||
| ## Key Conventions | ||
|
|
||
| - Configuration is managed via the `Settings` class with BentoBox's `@StoreAt`/`@ConfigComment` annotations and `Config<Settings>` loader | ||
| - Game modes can be excluded via `Settings.getDisabledGameModes()` | ||
| - Localization files live in `src/main/resources/locales/` (20+ languages, YAML format) | ||
| - `BorderType` is an enum with byte-based serialization ids (`fromId`/`getId`) |
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
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.