Conversation
There was a problem hiding this comment.
Pull request overview
This PR bumps the plugin to version 3.11.2 and refines island/home teleport and primary-island handling, while updating the build to target newer Paper and Java 21 settings.
Changes:
- Extend
IslandsManager.getIsland(World, UUID)to prefer the island the (online) player is currently on, and introduce a newhomeTeleportAsync(Island, User, boolean)overload plusgetPrimaryIsland(World, UUID)convenience method. - Adjust island creation (
NewIsland) and/is gologic to use the new APIs (including support for island-name destinations) and to better manage spawn/home locations and primary islands. - Update Gradle build configuration for version
3.11.2, newer Paper API, and consistent Java 21 compilation; adapt tests to the updated method overloads.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/world/bentobox/bentobox/api/commands/island/IslandExpelCommandTest.java | Tightens the Mockito verification to the homeTeleportAsync(World, Player) overload after new overloads were added. |
| src/main/java/world/bentobox/bentobox/managers/island/NewIsland.java | After island creation, now sets the island-based home location and primary island, and uses the new homeTeleportAsync(Island, User, boolean) for first-time teleports. |
| src/main/java/world/bentobox/bentobox/managers/IslandsManager.java | Changes getIsland(World, UUID) to check the player’s current island when online, adds getPrimaryIsland(World, UUID) and homeTeleportAsync(Island, User[, boolean]), and wires these into existing home-location logic. |
| src/main/java/world/bentobox/bentobox/database/objects/Island.java | Simplifies setSpawnPoint to avoid unnecessary setChanged() calls and to clone the stored Location. |
| src/main/java/world/bentobox/bentobox/api/commands/island/IslandGoCommand.java | Refactors /is go to distinguish between island names and home names, setting primary islands accordingly and using either the existing world-based teleport or the new island-based teleport. |
| build.gradle.kts | Bumps plugin version to 3.11.2, updates Paper API version, drops the Spigot compile-only dependency, and standardizes Java 21 compiler options for main and test sources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@tastybento I've opened a new pull request, #2792, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@tastybento I've opened a new pull request, #2793, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Fix Javadoc @link syntax in getPrimaryIsland method
|
@tastybento I've opened a new pull request, #2794, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Extend the ALLAY flag to also protect Copper Golems in EntityInteractListener. A player right-clicking a Copper Golem that is carrying an item would cause it to drop the item, bypassing island protection. Copper Golems carry items just like Allays, so the ALLAY flag is the logical fit. Entity type is matched by name string for cross-version safety, consistent with Util.isPassiveEntity(). Closes #2798 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on/EntityInteractListenerTest.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tion_protection Fix Copper Golem item theft via player interaction
Each placeholder item in the list panel now shows the current value for the viewing player alongside the description: - LEAF / LEAF_FOLDER: one "→ <value>" line (or "→ (empty)" if blank) - SERIES / LEAF_SERIES: up to 3 sample lines "#N → <value>" for the first N members of the series, so admins can verify the values without leaving the GUI Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ests
- PlaceholderPanel: hide the BentoBox core placeholder button when no
core placeholders are registered (currently always 0), avoiding a
confusing "0 core placeholders" entry in the GUI.
- PlaceholderListPanel: fix LEAF_SERIES button name — series.displayKey()
already contains "_{N}", so appending it again produced "stem_{N}_{N}".
- Add PlaceholderGrouperTest (18 tests) covering: empty input, plain
single keys, numeric-suffix series detection, min/max tracking, raw-key
ordering, stem-also-registered-as-single case, output sorting,
description lookup, series description stripping, and the
stripTrailingHashNumber helper.
- Add PlaceholderNodeTest (19 tests) covering: empty trie, single/series
node construction, all five NodeType values, path compression (stops at
leaf, series, and multi-child nodes; partial compression for fan-out
chains), alphabetic sort of display children, totalPlaceholderCount
(leaf / series / recursive), and drill-into navigation of a compressed
node.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add placeholder browser GUI and dump command (#1332)
…isabled_nether Fix NETHER_PORTAL flag bypass when paper misc.enable-nether is false
Refactor AdminPurgeRegionsCommand to dynamically handle nether and end world regions
Nether and End worlds store region data in DIM-1/ and DIM1/ subfolders within their world folder, but the purge command was looking directly in worldFolder/region/ which doesn't exist. This caused deleteIfExists() to silently succeed without actually deleting anything. Add resolveDataFolder() helper that checks the world's environment type and resolves the correct dimension subfolder (DIM-1 for nether, DIM1 for end). Also add diagnostic logging to confirm which paths are used and how many region files are found per dimension. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix purge regions not deleting nether/end region files
Wire up the existing BlueprintBundle cost field with full Vault economy support: admin GUI editor, player-facing cost display, and automatic charge/check on island creation and reset. Cost only applies when multiple bundles are available. Reset charging is gated behind a new config option (charge-for-blueprint-on-reset, default false). All cost logic is silently skipped when Vault/economy is not installed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Translate cost, no-cost, and cost-amount keys into all 22 non-English locale files. Also update en-US to use [prefix_Island] placeholder instead of hardcoded "Bundle". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Translate the remaining two locale entries to all 22 non-English files: - commands.island.create.cannot-afford (player error message) - panels.island_creation.buttons.bundle.cost (panel cost display) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract the common cost-checking logic from IslandCreateCommand and IslandResetCommand into a package-private BlueprintCostHelper class to eliminate code duplication. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…cost Add economy integration for blueprint bundle costs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…olderListPanel into AbstractPanel Move identical createNextButton, createPreviousButton, and addTooltips implementations up into AbstractPanel with hook methods getPagedItemCount() and getPagedItemType() so subclasses only supply their list size and item-type key. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactor command argument checks and enhance null safety in various c…
…l-dedup Deduplicate PlaceholderPanel pagination into AbstractPanel
Address 22 of 29 HIGH severity issues reported by SonarCloud: - Add comments to empty test method stubs (12 issues) - Convert try/finally to try-with-resources in LocalesManagerTest - Replace replaceAll() with replace() for literal strings - Extract duplicated string literals into constants (TextVariables) - Remove unnecessary generic wildcards from NPCHook - Reduce cognitive complexity by extracting helper methods in HurtingListener, EntityInteractListener, BlueprintEntity, IslandsManager, FlagListener, User, BlueprintClipboard, AdminMaxHomesCommand, and LanguagePanel Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix SonarCloud HIGH severity code smells
Fix ~394 SonarCloud Medium/Low severity issues: - S6068: Remove useless eq() in Mockito when all arguments use eq() (~299 issues, 55 files) - S125: Remove commented-out code blocks (~95 issues, 34 files) Keeps eq() when mixed with any()/other matchers. Preserves TODO comments, explanatory comments, and Javadoc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix ~20 SonarCloud Medium/Low severity issues: - S1607: Re-enable 1 passing test (RanksManagerTest), remove 7 empty stubs, add descriptive reasons to 9 remaining @disabled annotations - S5976: Convert similar test groups to @ParameterizedTest in BannedCommandsTest (12 tests → 2 parameterized) and JoinLeaveListenerTest (3 tests → 1 parameterized) - S5961: Split testInstantReturn with 4 scenarios into 4 focused test methods Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ements Fix SonarCloud: Disabled tests, parameterized tests
Fix SonarCloud: Remove redundant Mockito eq() and commented-out code
|



No description provided.