From 24876b05acf9c0d0a4c3a15564d59bf014d842e4 Mon Sep 17 00:00:00 2001 From: Roberto Villegas Date: Sun, 21 Jun 2026 18:35:59 -0600 Subject: [PATCH 1/2] Update XSeries for newer Paper versions --- pom.xml | 6 +++++- src/main/java/org/mcteam/ancientgates/Gates.java | 2 +- .../org/mcteam/ancientgates/util/types/GateMaterial.java | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 464fe7b..fd825cf 100644 --- a/pom.xml +++ b/pom.xml @@ -125,6 +125,10 @@ CodeMC https://repo.codemc.org/repository/maven-public/ + + jitpack.io + https://jitpack.io + @@ -172,7 +176,7 @@ com.github.cryptomorin XSeries - 10.0.0 + 13.8.0 diff --git a/src/main/java/org/mcteam/ancientgates/Gates.java b/src/main/java/org/mcteam/ancientgates/Gates.java index c5c68b6..8765ba3 100644 --- a/src/main/java/org/mcteam/ancientgates/Gates.java +++ b/src/main/java/org/mcteam/ancientgates/Gates.java @@ -127,7 +127,7 @@ public static boolean open(final Gate gate) { coord.getBlock().setBiome(Biome.FOREST); } if (orientation == FloodOrientation.VERTICAL1 && material == GateMaterial.PORTAL) { - if (XMaterial.supports(13)) { + if (XMaterial.supports(13, 0)) { final BlockData orientable = coord.getBlock().getBlockData(); ((Orientable) orientable).setAxis(Axis.Z); coord.getBlock().setBlockData(orientable); diff --git a/src/main/java/org/mcteam/ancientgates/util/types/GateMaterial.java b/src/main/java/org/mcteam/ancientgates/util/types/GateMaterial.java index 7106ebf..e45216f 100644 --- a/src/main/java/org/mcteam/ancientgates/util/types/GateMaterial.java +++ b/src/main/java/org/mcteam/ancientgates/util/types/GateMaterial.java @@ -20,7 +20,7 @@ public enum GateMaterial { ENDPORTAL("ender portal blocks", XMaterial.END_PORTAL.parseMaterial()), // LAVA - LAVA("stationary lava blocks", XMaterial.supports(13) ? Material.LAVA : Material.getMaterial("STATIONARY_LAVA")), + LAVA("stationary lava blocks", XMaterial.supports(13, 0) ? Material.LAVA : Material.getMaterial("STATIONARY_LAVA")), // NETHER PORTAL("nether blocks", XMaterial.NETHER_PORTAL.parseMaterial()), @@ -29,7 +29,7 @@ public enum GateMaterial { SUGARCANE("sugarcane blocks", XMaterial.SUGAR_CANE.parseMaterial()), // WATER - WATER("stationary water blocks", XMaterial.supports(13) ? Material.WATER : Material.getMaterial("STATIONARY_WATER")), + WATER("stationary water blocks", XMaterial.supports(13, 0) ? Material.WATER : Material.getMaterial("STATIONARY_WATER")), // WEB WEB("spiders web blocks", XMaterial.COBWEB.parseMaterial()); From 1f774514f2d36e1ed6a13dc42ec4911a1340de14 Mon Sep 17 00:00:00 2001 From: Roberto Villegas Date: Sun, 21 Jun 2026 19:29:12 -0600 Subject: [PATCH 2/2] Address review: use XReflection.supports and resolve XSeries from Maven Central - Replace internal XMaterial.supports(major, minor) with the public XReflection.supports(int) API. The previous supports(13, 0) was wrong since it meant Minecraft 13.0; supports(13) correctly checks for 1.13+. - Drop XSeries to 13.7.0 (latest published on Maven Central) and remove the jitpack.io repository, since XSeries is available on Central. --- pom.xml | 6 +----- src/main/java/org/mcteam/ancientgates/Gates.java | 4 ++-- .../org/mcteam/ancientgates/util/types/GateMaterial.java | 5 +++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index fd825cf..f3aba57 100644 --- a/pom.xml +++ b/pom.xml @@ -125,10 +125,6 @@ CodeMC https://repo.codemc.org/repository/maven-public/ - - jitpack.io - https://jitpack.io - @@ -176,7 +172,7 @@ com.github.cryptomorin XSeries - 13.8.0 + 13.7.0 diff --git a/src/main/java/org/mcteam/ancientgates/Gates.java b/src/main/java/org/mcteam/ancientgates/Gates.java index 8765ba3..33fc87d 100644 --- a/src/main/java/org/mcteam/ancientgates/Gates.java +++ b/src/main/java/org/mcteam/ancientgates/Gates.java @@ -14,7 +14,7 @@ import org.mcteam.ancientgates.util.types.GateMaterial; import org.mcteam.ancientgates.util.types.WorldCoord; -import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.reflection.XReflection; public class Gates { @@ -127,7 +127,7 @@ public static boolean open(final Gate gate) { coord.getBlock().setBiome(Biome.FOREST); } if (orientation == FloodOrientation.VERTICAL1 && material == GateMaterial.PORTAL) { - if (XMaterial.supports(13, 0)) { + if (XReflection.supports(13)) { final BlockData orientable = coord.getBlock().getBlockData(); ((Orientable) orientable).setAxis(Axis.Z); coord.getBlock().setBlockData(orientable); diff --git a/src/main/java/org/mcteam/ancientgates/util/types/GateMaterial.java b/src/main/java/org/mcteam/ancientgates/util/types/GateMaterial.java index e45216f..6671552 100644 --- a/src/main/java/org/mcteam/ancientgates/util/types/GateMaterial.java +++ b/src/main/java/org/mcteam/ancientgates/util/types/GateMaterial.java @@ -7,6 +7,7 @@ import org.bukkit.Material; import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.reflection.XReflection; public enum GateMaterial { // AIR @@ -20,7 +21,7 @@ public enum GateMaterial { ENDPORTAL("ender portal blocks", XMaterial.END_PORTAL.parseMaterial()), // LAVA - LAVA("stationary lava blocks", XMaterial.supports(13, 0) ? Material.LAVA : Material.getMaterial("STATIONARY_LAVA")), + LAVA("stationary lava blocks", XReflection.supports(13) ? Material.LAVA : Material.getMaterial("STATIONARY_LAVA")), // NETHER PORTAL("nether blocks", XMaterial.NETHER_PORTAL.parseMaterial()), @@ -29,7 +30,7 @@ public enum GateMaterial { SUGARCANE("sugarcane blocks", XMaterial.SUGAR_CANE.parseMaterial()), // WATER - WATER("stationary water blocks", XMaterial.supports(13, 0) ? Material.WATER : Material.getMaterial("STATIONARY_WATER")), + WATER("stationary water blocks", XReflection.supports(13) ? Material.WATER : Material.getMaterial("STATIONARY_WATER")), // WEB WEB("spiders web blocks", XMaterial.COBWEB.parseMaterial());