fix(heights): support Purpur 26.3
CI / build (push) Successful in 1m10s
CI / build (pull_request) Successful in 1m14s

This commit is contained in:
dmg committed 2026-10-16 22:44:55 -04:00
1 parent a6c80e7ac9
commit 68d4a854c3
9 files changed
+140 -49

No files matched your search

@@ -64,7 +64,12 @@ class PotionRecipesTest {
input.getItemMeta().getPersistentDataContainer().set(key, PersistentDataType.STRING, kind.name());
org.junit.jupiter.api.Assertions.assertTrue(mix.getInput().test(input));
org.junit.jupiter.api.Assertions.assertFalse(mix.getInput().test(mix.getResult()));
org.junit.jupiter.api.Assertions.assertTrue(mix.getIngredient().test(new BukkitDoubles.Item(
var ingredient = org.junit.jupiter.api.Assertions.assertInstanceOf(
org.bukkit.inventory.RecipeChoice.PredicateChoice.class, mix.getIngredient(),
"Purpur 26.3 builds brewing reagent indexes from representative recipe choices");
assertEquals(splash ? Material.GUNPOWDER : Material.DRAGON_BREATH,
ingredient.getItemStack().getType());
org.junit.jupiter.api.Assertions.assertTrue(ingredient.test(new BukkitDoubles.Item(
splash ? Material.GUNPOWDER : Material.DRAGON_BREATH)));
org.junit.jupiter.api.Assertions.assertFalse(mix.getIngredient().test(new BukkitDoubles.Item(Material.SUGAR)));
}
@@ -22,9 +22,16 @@ class PurpurDistributionTest {
assertEquals(version, metadata.get("version"));
assertEquals("SpigotHeights", metadata.get("name"), "Retain the data directory and persistent namespace");
assertEquals("games.dmg.spigotheights.SpigotHeightsPlugin", metadata.get("main"));
assertEquals("1.21", metadata.get("api-version"));
assertTrue(((Map<?, ?>) metadata.get("commands")).containsKey("heights"));
assertTrue(((Map<?, ?>) metadata.get("permissions")).containsKey("spigotheights.admin"));
assertFalse(jar.stream().anyMatch(entry -> entry.getName().startsWith("org/bukkit/")
|| entry.getName().startsWith("org/purpurmc/") || entry.getName().endsWith("Test.class")));
|| entry.getName().startsWith("org/purpurmc/")
|| entry.getName().startsWith("net/minecraft/")
|| entry.getName().startsWith("com/comphenix/protocol/")
|| entry.getName().startsWith("org/junit/")
|| entry.getName().startsWith("org/mockito/")
|| entry.getName().endsWith("Test.class")));
}
}
@@ -64,9 +71,13 @@ class PurpurDistributionTest {
}
@Test
void releaseAndCiAgreeWithThePurpurDistributionNameAndToolchain() throws Exception {
void releaseAndCiAgreeWithThePurpur26_3DistributionAndToolchain() throws Exception {
String build = Files.readString(Path.of("build.gradle.kts"));
assertTrue(build.contains("purpur-api:26.2.build.2618-stable"));
assertTrue(build.contains("purpur-api:26.3.build.2651-stable"));
assertTrue(build.contains("purpur-26.3-2651.jar"));
assertTrue(build.contains("https://api.purpurmc.org/v2/purpur/26.3/2651/download"));
assertTrue(build.contains("0677c1febecfbc2e5b0a7f76abd647b70a1f38d3cbdf3dd6a82e401b4262a598"));
assertFalse(build.contains("26.2") || build.contains("2618"));
assertFalse(build.contains("org.spigotmc:spigot-api"));
for (String workflow : new String[] {"ci.yml", "release.yml"}) {
String content = Files.readString(Path.of(".gitea/workflows", workflow));