From b7c8268aa5ccb14cb3b37002a67debbb97e9d94e Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 20:41:30 +0200 Subject: [PATCH 01/11] Migrate dependency management to Adventure 5 --- pom.xml | 126 +++++++++++++++++++++++--------------------------------- 1 file changed, 52 insertions(+), 74 deletions(-) diff --git a/pom.xml b/pom.xml index 3cacbcf..c822a7b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 nl.hauntedmc.serverfeatures @@ -15,7 +15,7 @@ UTF-8 - 4.26.1 + 5.2.0 2.14.0 26.1.2.build.74-stable 1.11.5 @@ -47,6 +47,7 @@ 5.23.0 3.15.0 + 3.6.2 @@ -81,6 +82,30 @@ 25 + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven.enforcer.plugin.version} + + + enforce-adventure-5 + + enforce + + + + + true + + net.kyori:*:[0,5.0.0) + + Adventure 4.x is not supported. Keep all net.kyori dependencies on Adventure 5.x. + + + + + + org.apache.maven.plugins maven-checkstyle-plugin @@ -109,7 +134,6 @@ -Dnet.bytebuddy.experimental=true -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar - org.apache.maven.plugins maven-shade-plugin @@ -122,18 +146,14 @@ - io.github.classgraph nl.hauntedmc.serverfeatures.shaded.classgraph - - org.apache.commons.text nl.hauntedmc.serverfeatures.shaded.commons_text - nonapi.io.github.classgraph nl.hauntedmc.serverfeatures.shaded.nonapi.classgraph @@ -167,8 +187,16 @@ + + + net.kyori + adventure-bom + ${adventure.version} + pom + import + com.intellectualsites.bom bom-newest @@ -178,70 +206,26 @@ + - - central - https://repo.maven.apache.org/maven2 - - - papermc - https://repo.papermc.io/repository/maven-public/ - - - essentials-releases - https://repo.essentialsx.net/releases/ - - - enginehub - https://maven.enginehub.org/repo/ - - - spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - - jitpack.io - https://jitpack.io - - - placeholderapi - https://repo.extendedclip.com/content/repositories/placeholderapi/ - - - codemc-releases - https://repo.codemc.io/repository/maven-releases/ - - - codemc-snapshots - https://repo.codemc.io/repository/maven-snapshots/ - - - md_5-public - https://repo.md-5.net/content/groups/public/ - - - md_5-releases - https://repo.md-5.net/content/repositories/releases/ - - - citizens-repo - https://maven.citizensnpcs.co/repo - - - libsdisguises-public - https://mvn.lib.co.nz/public/ - - - viaversion-repo - https://repo.viaversion.com - - - github - https://maven.pkg.github.com/HauntedMC/* - + centralhttps://repo.maven.apache.org/maven2 + papermchttps://repo.papermc.io/repository/maven-public/ + essentials-releaseshttps://repo.essentialsx.net/releases/ + enginehubhttps://maven.enginehub.org/repo/ + spigot-repohttps://hub.spigotmc.org/nexus/content/repositories/snapshots/ + jitpack.iohttps://jitpack.io + placeholderapihttps://repo.extendedclip.com/content/repositories/placeholderapi/ + codemc-releaseshttps://repo.codemc.io/repository/maven-releases/ + codemc-snapshotshttps://repo.codemc.io/repository/maven-snapshots/ + md_5-publichttps://repo.md-5.net/content/groups/public/ + md_5-releaseshttps://repo.md-5.net/content/repositories/releases/ + citizens-repohttps://maven.citizensnpcs.co/repo + libsdisguises-publichttps://mvn.lib.co.nz/public/ + viaversion-repohttps://repo.viaversion.com + githubhttps://maven.pkg.github.com/HauntedMC/* + - com.google.code.gson gson @@ -251,31 +235,26 @@ net.kyori adventure-api - ${adventure.version} provided net.kyori adventure-text-minimessage - ${adventure.version} provided net.kyori adventure-text-serializer-gson - ${adventure.version} provided net.kyori adventure-text-serializer-legacy - ${adventure.version} provided net.kyori adventure-text-serializer-plain - ${adventure.version} provided @@ -302,7 +281,6 @@ ${proxyfeatures.version} compile - nl.hauntedmc.dataprovider dataprovider From d9c5912ab5bf953ecbe14f5397ed5448fa374a9d Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 20:45:58 +0200 Subject: [PATCH 02/11] Restrict Adventure version enforcement to Adventure artifacts --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c822a7b..d642895 100644 --- a/pom.xml +++ b/pom.xml @@ -97,9 +97,9 @@ true - net.kyori:*:[0,5.0.0) + net.kyori:adventure-*:[0,5.0.0) - Adventure 4.x is not supported. Keep all net.kyori dependencies on Adventure 5.x. + Adventure 4.x is not supported. Keep all Adventure dependencies on 5.x. From 74929538f57eb59e4de37c8b5041f90acdbff6f4 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 20:51:34 +0200 Subject: [PATCH 03/11] Add Adventure dependency and Maven diagnostics checks --- .github/workflows/ci-tests-and-coverage.yml | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests-and-coverage.yml b/.github/workflows/ci-tests-and-coverage.yml index b9fd456..12de34c 100644 --- a/.github/workflows/ci-tests-and-coverage.yml +++ b/.github/workflows/ci-tests-and-coverage.yml @@ -47,7 +47,30 @@ jobs: server-password: PACKAGES_TOKEN - name: Run Maven Verify - run: mvn -U -B -ntp verify + shell: bash + run: | + set -o pipefail + mkdir -p target/ci + mvn -U -B -ntp verify 2>&1 | tee target/ci/maven-verify.log + + - name: Verify Adventure dependency alignment + shell: bash + run: | + mvn -B -ntp dependency:tree \ + '-Dincludes=net.kyori:adventure-*' \ + -DoutputFile=target/ci/adventure-dependency-tree.txt + cat target/ci/adventure-dependency-tree.txt + if grep -E 'net\.kyori:adventure-[^:]+:[^:]+:4\.' target/ci/adventure-dependency-tree.txt; then + echo "Adventure 4.x remains in the resolved dependency graph." >&2 + exit 1 + fi + + - name: Upload CI diagnostics + if: always() + uses: actions/upload-artifact@v7 + with: + name: ci-diagnostics + path: target/ci - name: Upload JaCoCo Report if: always() From 86f12a938a1b083c659aafd675dcbaf63f093710 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 20:57:24 +0200 Subject: [PATCH 04/11] Enforce Adventure 5 only for core modules --- pom.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d642895..3b355b0 100644 --- a/pom.xml +++ b/pom.xml @@ -97,9 +97,13 @@ true - net.kyori:adventure-*:[0,5.0.0) + net.kyori:adventure-api:[0,5.0.0) + net.kyori:adventure-key:[0,5.0.0) + net.kyori:adventure-nbt:[0,5.0.0) + net.kyori:adventure-resource-pack:[0,5.0.0) + net.kyori:adventure-text-*:[0,5.0.0) - Adventure 4.x is not supported. Keep all Adventure dependencies on 5.x. + Adventure 4.x core modules are not supported. Keep the Adventure core dependency graph on 5.x. From 396a5ba03b63651c38d42a1ae39a94d323c809e1 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 20:58:06 +0200 Subject: [PATCH 05/11] Limit dependency validation to Adventure core modules --- .github/workflows/ci-tests-and-coverage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-tests-and-coverage.yml b/.github/workflows/ci-tests-and-coverage.yml index 12de34c..593569c 100644 --- a/.github/workflows/ci-tests-and-coverage.yml +++ b/.github/workflows/ci-tests-and-coverage.yml @@ -60,8 +60,8 @@ jobs: '-Dincludes=net.kyori:adventure-*' \ -DoutputFile=target/ci/adventure-dependency-tree.txt cat target/ci/adventure-dependency-tree.txt - if grep -E 'net\.kyori:adventure-[^:]+:[^:]+:4\.' target/ci/adventure-dependency-tree.txt; then - echo "Adventure 4.x remains in the resolved dependency graph." >&2 + if grep -E 'net\.kyori:(adventure-api|adventure-key|adventure-nbt|adventure-resource-pack|adventure-text-[^:]+):[^:]+:4\.' target/ci/adventure-dependency-tree.txt; then + echo "Adventure 4.x core modules remain in the resolved dependency graph." >&2 exit 1 fi From 70c52242393774302f5672cab8d52b41dcf7e841 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 21:03:53 +0200 Subject: [PATCH 06/11] Exclude legacy Adventure platform transitives from EssentialsX --- pom.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3b355b0..f6c3fab 100644 --- a/pom.xml +++ b/pom.xml @@ -101,7 +101,17 @@ net.kyori:adventure-key:[0,5.0.0) net.kyori:adventure-nbt:[0,5.0.0) net.kyori:adventure-resource-pack:[0,5.0.0) - net.kyori:adventure-text-*:[0,5.0.0) + net.kyori:adventure-serializer-configurate4:[0,5.0.0) + net.kyori:adventure-text-logger-slf4j:[0,5.0.0) + net.kyori:adventure-text-minimessage:[0,5.0.0) + net.kyori:adventure-text-serializer-ansi:[0,5.0.0) + net.kyori:adventure-text-serializer-commons:[0,5.0.0) + net.kyori:adventure-text-serializer-gson:[0,5.0.0) + net.kyori:adventure-text-serializer-gson-legacy-impl:[0,5.0.0) + net.kyori:adventure-text-serializer-json:[0,5.0.0) + net.kyori:adventure-text-serializer-json-legacy-impl:[0,5.0.0) + net.kyori:adventure-text-serializer-legacy:[0,5.0.0) + net.kyori:adventure-text-serializer-plain:[0,5.0.0) Adventure 4.x core modules are not supported. Keep the Adventure core dependency graph on 5.x. @@ -383,6 +393,13 @@ EssentialsX ${essentialsx.version} provided + + + + net.kyori + adventure-platform-bukkit + + org.junit.jupiter From 16f0c83ff99d7e45d24789cfff7bdd3192e8cb9d Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 21:04:08 +0200 Subject: [PATCH 07/11] Validate only Adventure core dependency versions --- .github/workflows/ci-tests-and-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests-and-coverage.yml b/.github/workflows/ci-tests-and-coverage.yml index 593569c..272488d 100644 --- a/.github/workflows/ci-tests-and-coverage.yml +++ b/.github/workflows/ci-tests-and-coverage.yml @@ -60,7 +60,7 @@ jobs: '-Dincludes=net.kyori:adventure-*' \ -DoutputFile=target/ci/adventure-dependency-tree.txt cat target/ci/adventure-dependency-tree.txt - if grep -E 'net\.kyori:(adventure-api|adventure-key|adventure-nbt|adventure-resource-pack|adventure-text-[^:]+):[^:]+:4\.' target/ci/adventure-dependency-tree.txt; then + if grep -E 'net\.kyori:(adventure-api|adventure-key|adventure-nbt|adventure-resource-pack|adventure-serializer-configurate4|adventure-text-logger-slf4j|adventure-text-minimessage|adventure-text-serializer-(ansi|commons|gson|gson-legacy-impl|json|json-legacy-impl|legacy|plain)):[^:]+:4\.' target/ci/adventure-dependency-tree.txt; then echo "Adventure 4.x core modules remain in the resolved dependency graph." >&2 exit 1 fi From ce225cb5d50f2dbdc7b69e5c1de873651c3845c8 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 21:09:33 +0200 Subject: [PATCH 08/11] Update NBT component inspection for Adventure 5 --- .../api/util/text/format/inspect/FormatInspector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/nl/hauntedmc/serverfeatures/api/util/text/format/inspect/FormatInspector.java b/src/main/java/nl/hauntedmc/serverfeatures/api/util/text/format/inspect/FormatInspector.java index c5f668a..afbc50a 100644 --- a/src/main/java/nl/hauntedmc/serverfeatures/api/util/text/format/inspect/FormatInspector.java +++ b/src/main/java/nl/hauntedmc/serverfeatures/api/util/text/format/inspect/FormatInspector.java @@ -125,7 +125,7 @@ private static boolean hasFormattingRecursive(Component c, Set if (aspects.contains(ComponentAspect.TRANSLATABLE) && (c instanceof TranslatableComponent)) return true; if (aspects.contains(ComponentAspect.SCORE) && (c instanceof ScoreComponent)) return true; if (aspects.contains(ComponentAspect.SELECTOR) && (c instanceof SelectorComponent)) return true; - if (aspects.contains(ComponentAspect.NBT) && (c instanceof NBTComponent)) return true; + if (aspects.contains(ComponentAspect.NBT) && (c instanceof NBTComponent)) return true; // Children for (Component child : c.children()) { From 9651f2823af833deb001354d6de2ced0efad51c5 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 21:18:18 +0200 Subject: [PATCH 09/11] Target Paper 26.2 for native Adventure 5 support --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f6c3fab..843c9bb 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ 5.2.0 2.14.0 - 26.1.2.build.74-stable + 26.2.build.65-beta 1.11.5 3.0.5 2.11.4 From 2a763803fa96883da7e73ccd2fded2132c4dc091 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 21:26:07 +0200 Subject: [PATCH 10/11] Keep the Adventure migration diff focused --- pom.xml | 89 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 69 insertions(+), 20 deletions(-) diff --git a/pom.xml b/pom.xml index 843c9bb..336fbca 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 nl.hauntedmc.serverfeatures @@ -148,6 +148,7 @@ -Dnet.bytebuddy.experimental=true -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar + org.apache.maven.plugins maven-shade-plugin @@ -160,14 +161,18 @@ + io.github.classgraph nl.hauntedmc.serverfeatures.shaded.classgraph + + org.apache.commons.text nl.hauntedmc.serverfeatures.shaded.commons_text + nonapi.io.github.classgraph nl.hauntedmc.serverfeatures.shaded.nonapi.classgraph @@ -201,7 +206,6 @@ - @@ -220,26 +224,70 @@ - - centralhttps://repo.maven.apache.org/maven2 - papermchttps://repo.papermc.io/repository/maven-public/ - essentials-releaseshttps://repo.essentialsx.net/releases/ - enginehubhttps://maven.enginehub.org/repo/ - spigot-repohttps://hub.spigotmc.org/nexus/content/repositories/snapshots/ - jitpack.iohttps://jitpack.io - placeholderapihttps://repo.extendedclip.com/content/repositories/placeholderapi/ - codemc-releaseshttps://repo.codemc.io/repository/maven-releases/ - codemc-snapshotshttps://repo.codemc.io/repository/maven-snapshots/ - md_5-publichttps://repo.md-5.net/content/groups/public/ - md_5-releaseshttps://repo.md-5.net/content/repositories/releases/ - citizens-repohttps://maven.citizensnpcs.co/repo - libsdisguises-publichttps://mvn.lib.co.nz/public/ - viaversion-repohttps://repo.viaversion.com - githubhttps://maven.pkg.github.com/HauntedMC/* + + central + https://repo.maven.apache.org/maven2 + + + papermc + https://repo.papermc.io/repository/maven-public/ + + + essentials-releases + https://repo.essentialsx.net/releases/ + + + enginehub + https://maven.enginehub.org/repo/ + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + jitpack.io + https://jitpack.io + + + placeholderapi + https://repo.extendedclip.com/content/repositories/placeholderapi/ + + + codemc-releases + https://repo.codemc.io/repository/maven-releases/ + + + codemc-snapshots + https://repo.codemc.io/repository/maven-snapshots/ + + + md_5-public + https://repo.md-5.net/content/groups/public/ + + + md_5-releases + https://repo.md-5.net/content/repositories/releases/ + + + citizens-repo + https://maven.citizensnpcs.co/repo + + + libsdisguises-public + https://mvn.lib.co.nz/public/ + + + viaversion-repo + https://repo.viaversion.com + + + github + https://maven.pkg.github.com/HauntedMC/* + - + com.google.code.gson gson @@ -295,6 +343,7 @@ ${proxyfeatures.version} compile + nl.hauntedmc.dataprovider dataprovider @@ -394,7 +443,7 @@ ${essentialsx.version} provided - + net.kyori adventure-platform-bukkit From e9bf27d0ec9f410965af3a67233d00a9cdeafdc3 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Fri, 24 Jul 2026 21:37:40 +0200 Subject: [PATCH 11/11] Remove Adventure dependency alignment verification step Removed verification step for Adventure dependency alignment from CI workflow. Signed-off-by: Remy Duijsens --- .github/workflows/ci-tests-and-coverage.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/ci-tests-and-coverage.yml b/.github/workflows/ci-tests-and-coverage.yml index 272488d..6ba0dac 100644 --- a/.github/workflows/ci-tests-and-coverage.yml +++ b/.github/workflows/ci-tests-and-coverage.yml @@ -53,18 +53,6 @@ jobs: mkdir -p target/ci mvn -U -B -ntp verify 2>&1 | tee target/ci/maven-verify.log - - name: Verify Adventure dependency alignment - shell: bash - run: | - mvn -B -ntp dependency:tree \ - '-Dincludes=net.kyori:adventure-*' \ - -DoutputFile=target/ci/adventure-dependency-tree.txt - cat target/ci/adventure-dependency-tree.txt - if grep -E 'net\.kyori:(adventure-api|adventure-key|adventure-nbt|adventure-resource-pack|adventure-serializer-configurate4|adventure-text-logger-slf4j|adventure-text-minimessage|adventure-text-serializer-(ansi|commons|gson|gson-legacy-impl|json|json-legacy-impl|legacy|plain)):[^:]+:4\.' target/ci/adventure-dependency-tree.txt; then - echo "Adventure 4.x core modules remain in the resolved dependency graph." >&2 - exit 1 - fi - - name: Upload CI diagnostics if: always() uses: actions/upload-artifact@v7