Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ version = finalRevision
val javaVersion = "21"
val junitVersion = "5.10.2"
val mockitoVersion = "5.11.0"
val mockBukkitVersion = "v1.21-SNAPSHOT"
// Pin to a concrete JitPack tag rather than the v1.21-SNAPSHOT pointer.
// SNAPSHOT resolution on JitPack is flaky — it sometimes advertises a
// timestamped version in maven-metadata.xml whose corresponding .pom 404s,
// breaking dependency resolution mid-build. Newer tags (>= v4.111) also
// currently fail to build on JitPack because the project requires a Java 25
// toolchain that JitPack's default image doesn't have. v4.110.0 is the most
// recent tag with both POM and JAR available on JitPack.
val mockBukkitVersion = "v4.110.0"
val mongodbVersion = "3.12.12"
val mariadbVersion = "3.0.5"
val mysqlVersion = "8.0.27"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,15 @@ void testSetProtectionRange() {

@Test
void testSetRange() {
// setRange only allows values that disagree with the gamemode's configured
// distance-between-islands when the gamemode opts out via
// isEnforceEqualRanges()==false. That's the path StrangerRealms uses to grow
// claims with team size. Without the opt-out, setRange refuses mismatched
// values to prevent silent database corruption (see testSetRangeRefused...).
GameModeAddon optOutAddon = mock(GameModeAddon.class);
when(optOutAddon.isEnforceEqualRanges()).thenReturn(false);
when(iwm.getAddon(any())).thenReturn(Optional.of(optOutAddon));

island.setRange(200);
assertEquals(200, island.getRange());
}
Expand Down
Loading