Skip to content

Release 3.12.0#2871

Open
tastybento wants to merge 134 commits intomasterfrom
develop
Open

Release 3.12.0#2871
tastybento wants to merge 134 commits intomasterfrom
develop

Conversation

@tastybento
Copy link
Member

No description provided.

Copilot AI and others added 30 commits March 14, 2026 16:08
Add a 5-minute ExpiringSet cooldown per player UUID to prevent
rapid obsidian scooping that could duplicate lava buckets.
After a successful scoop, the player must wait before scooping again.

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uplication

Fix lava bucket duplication via rapid obsidian scooping
Reverse the .equals() call in getUnownedIslands() so that
this.getWorld() (non-null) is the receiver instead of
i.getWorld() (potentially null). Add test for null world case.

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
… end world

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…d guidance

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…-command-error

Fix NPE in purge unowned command when island world is null
…tructions

Add `.github/copilot-instructions.md` for Copilot coding agent
…n-explosions

Fix NPE in StandardSpawnProtectionListener for standard end/nether spawn explosions
…s no island

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…ission with named homes

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…-setting-home

Add regression tests for maxhomes.1 permission with named homes (issue #1564)
…tionality

Add configurable fallback command for `/is expel` when player has no island or spawn
In JUnit 5, test classes and their @test, @beforeeach, @AfterEach,
@BeforeAll, and @afterall methods do not need to be public. Removes
the public modifier from:
- Test class declarations (class FooTest instead of public class FooTest)
- @test annotated methods
- @beforeeach / @AfterEach lifecycle methods that are not overrides
  of public superclass methods
Shared base classes (CommonTestSetup, RanksManagerTestSetup,
TestWorldSettings, TestBentoBox) and their setUp()/tearDown() methods
retain public visibility as they are extended/accessed across packages.
All 165 modified test files continue to compile and pass.
…junit5-test-methods

chore: Remove unnecessary public modifiers from JUnit 5 test classes
tastybento and others added 29 commits March 15, 2026 15:54
…loud S3776)

Extract permission check, island-access check, and flag click handling
into focused helper methods to bring cognitive complexity within the
allowed threshold.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevent NoClassDefFoundError when BlueMap plugin is not installed by
checking if the BlueMap API class is available before instantiating
BlueMapHook, following the same pattern used for Multiverse hooks.

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…error

Guard BlueMapHook registration with class availability check
…ting helpers

Extract deserializeString() and deserializeEnum() from the monolithic
deserialize() method to reduce cyclomatic complexity from 30 to ~15.
Add 24 JUnit 5 tests covering all deserialization paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract parseActions(), parseActionList(), parseAttributes(), and
parseEquipment() from the monolithic spawnNpc method. Also removes
dead code (unused getNpc call, redundant newId variable) and fixes
inconsistent indentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…omplexity by extracting helpers

Extract resolveOwnIsland, resolveVisitedIsland, getNthName, getNthRank,
countOnlineMembers, and registerOnlineMemberCountPlaceholders to eliminate
repeated null checks, island lookups, and nth-element iteration from inline
lambdas. Also enhance PlaceholdersManagerTest from 2 to 45 tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add tests for DyeListener, ExplosionListener (block explosion methods),
ItemDropPickUpListener, LeashListener, LecternListener, PortalListener,
SculkShriekerListener, ShearingListener, and TeleportationListener.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add tests for GeoLimitClickListener, MobLimitClickListener, and
CommandCycleClick covering permission checks, rank cycling, shift-click
hide/show toggling, and edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cover leaf decay allowed/not allowed, not in world, and outside island
with world setting on/off.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add tests for NaturalSpawningOutsideRangeListener, SpawnerSpawnEggsListener,
and PodzolListener covering flag checks, world checks, permission bypasses,
and edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 121 tests covering constructors, member management, spatial logic,
flags, homes, bonus ranges, cooldowns, command ranks, metadata, and
primaries for the core domain object.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address non-deprecation MINOR/INFO severity issues: remove unused
imports (S1128), redundant eq() matchers (S6068), unnecessary throws
declarations (S1130), replace lambdas with method references (S1612),
fix Boolean unboxing risks (S5411), add null-safety for @nonnull
params (S2637), and misc fixes (EnumMap, pattern instanceof, naming).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address non-deprecation MAJOR severity issues: rename shadowing local
variables (S1117), use proper assertions (S5785), document empty blocks
(S108), remove commented-out code (S125), remove unused fields (S1068),
replace Guava Optional with java.util.Optional (S4738), use Math.clamp
(S6885), protect abstract constructors (S5993), remove unused params
(S1172), and misc fixes (S6213, S1854, S3415, S3358, S1871, S112).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reduce cognitive complexity in 6 methods by extracting helpers:
PVPListener, DefaultPasteUtil (2 methods), IslandsManager.saveAll,
YamlDatabaseHandler.processFile, IslandCreationPanel.createBundleButton.
Also fix duplicated string literal (S1192), static field mutation
(S2696), replaceAll vs replace (S5361), and empty test stubs (S1186).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-high-issues

Fix 236 SonarCloud issues (low, medium, high priority)
Thread.sleep() holds the monitor lock during the delay, blocking all
other threads. wait() releases the lock, allowing concurrent access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AddonClassLoader (extends URLClassLoader/Closeable) was never explicitly
closed, leaking file handles. Now closed in disable() and disableAddons()
after addons have finished their shutdown. Suppressed S2095 at creation
site since the loader must remain open for the addon's full lifetime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… field

The volatile ExpiringSet field uses standard double-checked locking for
lazy initialization, which is a correct and thread-safe pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants