Repository navigation
fix(bungee): remove adventure-platform to prevent Adventure 4.x/5.x class conflict - #642
Merged
jonesdevelopment merged 14 commits intoOct 13, 2026
Conversation
Removed adventure-platform-bukkit and adventure-platform-bungee dependencies.
Owner
|
Gonna take a look once I'm home; thank you for your contribution! |
Contributor
Author
|
Thank you! |
Removed adventure-platform-bukkit dependency from libs.versions.toml
Contributor
Author
|
I forgot to fix it also for Spigot |
Owner
|
Your changes are currently failing the CI pipeline due to the removal of |
Updated copyright year from 2025 to 2026 and refactored action bar message sending as commented by @jonesdevelopment
Contributor
Author
|
I have edited the sections you commented on and removed the line for Bukkit. I hope it works now! |
Owner
|
The current version is failing to load on BungeeCord due to https://mclo.gs/Tul69BA. I don't have the time to look into this at the moment, so I'd like to ask someone else to investigate. |
Owner
|
Please test your changes before asking for a (re-)review. |
Refactor LibraryLoader to a public class and add loaded state management.
Contributor
Author
|
The current version works in my environment. |
* Now makes use of Java 17+ features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #623
Problem
On BungeeCord, Sonar fails to enable with:
Two different Adventure versions end up in the same relocated package
xyz.jonesdev.sonar.libs.kyori:adventure-platform-bungeecord4.4.1 is bundled intoSonar-Bungee.jar(and pulls in Adventure 4.x, includingServices).LibraryLoaderadditionally downloads Adventure 5.2.0 (MiniMessage, Gson serializer, NBT) via Libby.MiniMessageImpl(5.2.0) then callsServices.service(ServiceLoader, Class), which only exists in 5.x, but resolvesServicesfrom the jar (4.x).Paper and Velocity are not affected because they ship Adventure themselves.
Changes
adventure-platform-bungeecordfrom thebungeecordmodule.BungeeAudience, a smallAudienceimplementation on top of BungeeCord's native chat API(
sendMessage,sendActionBar,showTitle). Components are serialized to JSON and passed toBungeeCord's
ComponentSerializer. Hex colors are downsampled for clients below 1.16, as before.SonarBungee#audience/#sendernow returnBungeeAudience.LibraryLoader: on BungeeCord, resolve the transitive dependencies of the Adventure libraries(e.g.
adventure-api,adventure-key), which previously came from adventure-platform. Gson is excludedbecause BungeeCord already provides it.
adventure-platform-bukkitentry inlibs.versions.toml.bukkit/build.gradle.ktsreferences it, but it was missing onmain, so the project did not build.Testing
./gradlew build-sonarsucceedsSonar-Bungee.jarcontains no Adventure classes (unzip -l ... | grep -i kyori)plugins/Sonar/lib/)/sonar,/sonar notify,/sonar verbose)Tested on: <BungeeCord/Waterfall version, Java version, Minecraft client version>
Not covered
The Bukkit module has the same pattern (
adventure-platform-bukkit4.4.1 bundled, Adventure 5.2.0 loaded via Libby).I did not change or test it in this PR.
AI disclosure (per CONTRIBUTING.md)
BungeeAudience,LibraryLoaderand build changes).I reviewed the code, built it and tested it myself as described above.